From 2bbd390a3b639089c3ef2cd56b1a294f943124a4 Mon Sep 17 00:00:00 2001 From: "nathan.vititoe" Date: Sun, 2 Aug 2026 16:35:11 -0400 Subject: [PATCH 1/3] image path changes, for dev setup, needs testing on 'prod' --- src/app/features/settings/about/About.tsx | 3 ++- src/app/pages/auth/AuthLayout.tsx | 3 ++- src/app/pages/auth/oidc/oidcConfig.ts | 2 +- src/app/pages/client/ClientNonUIFeatures.tsx | 8 ++++---- src/app/pages/client/WelcomePage.tsx | 3 ++- vite.config.js | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index 0ecf98452..ec1d4da61 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -4,10 +4,11 @@ import { Page, PageContent, PageHeader } from '../../../components/page'; import { SequenceCard } from '../../../components/sequence-card'; import { SequenceCardStyle } from '../styles.css'; import { SettingTile } from '../../../components/setting-tile'; -import LotusLogo from '../../../../../public/res/Lotus.png'; import pkg from '../../../../../package.json'; import { clearCacheAndReload } from '../../../../client/initMatrix'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; +import { getOriginBaseUrl, withOriginBaseUrl } from '../../../pages/pathUtils'; +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); type MSC1929Contact = { matrix_id?: string; diff --git a/src/app/pages/auth/AuthLayout.tsx b/src/app/pages/auth/AuthLayout.tsx index b78856011..2641ba07a 100644 --- a/src/app/pages/auth/AuthLayout.tsx +++ b/src/app/pages/auth/AuthLayout.tsx @@ -20,7 +20,6 @@ import { } from '../../hooks/useClientConfig'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { LOGIN_PATH, REGISTER_PATH, RESET_PASSWORD_PATH } from '../paths'; -import LotusLogo from '../../../../public/res/Lotus.png'; import { ServerPicker } from './ServerPicker'; import { AutoDiscoveryAction, autoDiscovery } from '../../cs-api'; import { SpecVersionsLoader } from '../../components/SpecVersionsLoader'; @@ -30,6 +29,8 @@ import { AuthFlowsLoader } from '../../components/AuthFlowsLoader'; import { AuthFlowsProvider } from '../../hooks/useAuthFlows'; import { AuthServerProvider } from '../../hooks/useAuthServer'; import { tryDecodeURIComponent } from '../../utils/dom'; +import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); const currentAuthPath = (pathname: string): string => { if (matchPath(LOGIN_PATH, pathname)) { diff --git a/src/app/pages/auth/oidc/oidcConfig.ts b/src/app/pages/auth/oidc/oidcConfig.ts index 015c25f33..b046ec150 100644 --- a/src/app/pages/auth/oidc/oidcConfig.ts +++ b/src/app/pages/auth/oidc/oidcConfig.ts @@ -1,7 +1,7 @@ import type { OidcRegistrationClientMetadata } from 'matrix-js-sdk'; -import LotusLogo from '../../../../../public/res/Lotus.png'; import { OIDC_CALLBACK_PATH } from '../../paths'; import { getOriginBaseUrl, withOriginBaseUrl } from '../../pathUtils'; +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); /** * Absolute URL the OIDC provider redirects back to after authorization. diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx index e14a1141c..69e682773 100644 --- a/src/app/pages/client/ClientNonUIFeatures.tsx +++ b/src/app/pages/client/ClientNonUIFeatures.tsx @@ -17,9 +17,6 @@ import { manualDndAtom } from '../../state/manualDnd'; import { isSnoozeActive, notificationSnoozeUntilAtom } from '../../state/notificationSnooze'; import { isWithinTimeWindow } from '../../utils/timeWindow'; import { roomToUnreadAtom } from '../../state/room/roomToUnread'; -import LogoSVG from '../../../../public/res/lotus.png'; -import LogoUnreadSVG from '../../../../public/res/lotus-unread.png'; -import LogoHighlightSVG from '../../../../public/res/lotus-highlight.png'; import NotificationSound from '../../../../public/sound/notification.ogg'; import InviteSound from '../../../../public/sound/invite.ogg'; import { notificationPermission, setFavicon, showOsNotification } from '../../utils/dom'; @@ -29,7 +26,7 @@ import { settingsAtom } from '../../state/settings'; import { allInvitesAtom } from '../../state/room-list/inviteList'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useHydrateMsgDrafts } from '../../hooks/useHydrateMsgDrafts'; -import { getDirectRoomPath, getHomeRoomPath, getInboxInvitesPath } from '../pathUtils'; +import { getDirectRoomPath, getHomeRoomPath, getInboxInvitesPath, getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; import { mDirectAtom } from '../../state/mDirectList'; import { getMemberName, @@ -66,6 +63,9 @@ import { shouldNotifyThreadReply, THREAD_NOTIFICATIONS_FALLBACK_BEHAVIOR, } from '../../utils/threadNotifications'; +const LogoSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus.png'); +const LogoUnreadSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus-unread.png') +const LogoHighlightSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus-highlight.png'); // Grace period after the initial sync settles before invite notifications arm, so // the async invite-atom population lands first and isn't mistaken for new invites. diff --git a/src/app/pages/client/WelcomePage.tsx b/src/app/pages/client/WelcomePage.tsx index aec27b98c..b807501aa 100644 --- a/src/app/pages/client/WelcomePage.tsx +++ b/src/app/pages/client/WelcomePage.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds'; import { Page, PageHero, PageHeroSection } from '../../components/page'; -import LotusLogo from '../../../../public/res/Lotus.png'; import pkg from '../../../../package.json'; +import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); export function WelcomePage() { return ( diff --git a/vite.config.js b/vite.config.js index faa37921d..235d3190c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -246,7 +246,7 @@ const vendorChunks = (id) => { export default defineConfig({ appType: 'spa', - publicDir: false, + publicDir: './public/res', base: buildConfig.base, server: { port: 8080, -- 2.47.3 From b2376513fd0be7dd8d8a42ca7d4e82cfb948e8f5 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 2 Aug 2026 18:42:37 -0400 Subject: [PATCH 2/3] fixed retarded linter problem --- src/app/features/settings/about/About.tsx | 1 + src/app/pages/auth/AuthLayout.tsx | 1 + src/app/pages/auth/oidc/oidcConfig.ts | 3 ++- src/app/pages/client/ClientNonUIFeatures.tsx | 15 +++++++++++---- src/app/pages/client/WelcomePage.tsx | 1 + 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index ec1d4da61..246f871a3 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -8,6 +8,7 @@ import pkg from '../../../../../package.json'; import { clearCacheAndReload } from '../../../../client/initMatrix'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; import { getOriginBaseUrl, withOriginBaseUrl } from '../../../pages/pathUtils'; + const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); type MSC1929Contact = { diff --git a/src/app/pages/auth/AuthLayout.tsx b/src/app/pages/auth/AuthLayout.tsx index 2641ba07a..e69630086 100644 --- a/src/app/pages/auth/AuthLayout.tsx +++ b/src/app/pages/auth/AuthLayout.tsx @@ -30,6 +30,7 @@ import { AuthFlowsProvider } from '../../hooks/useAuthFlows'; import { AuthServerProvider } from '../../hooks/useAuthServer'; import { tryDecodeURIComponent } from '../../utils/dom'; import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; + const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); const currentAuthPath = (pathname: string): string => { diff --git a/src/app/pages/auth/oidc/oidcConfig.ts b/src/app/pages/auth/oidc/oidcConfig.ts index b046ec150..69733eb16 100644 --- a/src/app/pages/auth/oidc/oidcConfig.ts +++ b/src/app/pages/auth/oidc/oidcConfig.ts @@ -1,7 +1,8 @@ import type { OidcRegistrationClientMetadata } from 'matrix-js-sdk'; import { OIDC_CALLBACK_PATH } from '../../paths'; import { getOriginBaseUrl, withOriginBaseUrl } from '../../pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); + +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); /** * Absolute URL the OIDC provider redirects back to after authorization. diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx index 69e682773..e6863f3d5 100644 --- a/src/app/pages/client/ClientNonUIFeatures.tsx +++ b/src/app/pages/client/ClientNonUIFeatures.tsx @@ -26,7 +26,13 @@ import { settingsAtom } from '../../state/settings'; import { allInvitesAtom } from '../../state/room-list/inviteList'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useHydrateMsgDrafts } from '../../hooks/useHydrateMsgDrafts'; -import { getDirectRoomPath, getHomeRoomPath, getInboxInvitesPath, getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; +import { + getDirectRoomPath, + getHomeRoomPath, + getInboxInvitesPath, + getOriginBaseUrl, + withOriginBaseUrl, +} from '../pathUtils'; import { mDirectAtom } from '../../state/mDirectList'; import { getMemberName, @@ -63,9 +69,10 @@ import { shouldNotifyThreadReply, THREAD_NOTIFICATIONS_FALLBACK_BEHAVIOR, } from '../../utils/threadNotifications'; -const LogoSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus.png'); -const LogoUnreadSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus-unread.png') -const LogoHighlightSVG = withOriginBaseUrl(getOriginBaseUrl() ,'/lotus-highlight.png'); + +const LogoSVG = withOriginBaseUrl(getOriginBaseUrl(), '/lotus.png'); +const LogoUnreadSVG = withOriginBaseUrl(getOriginBaseUrl(), '/lotus-unread.png'); +const LogoHighlightSVG = withOriginBaseUrl(getOriginBaseUrl(), '/lotus-highlight.png'); // Grace period after the initial sync settles before invite notifications arm, so // the async invite-atom population lands first and isn't mistaken for new invites. diff --git a/src/app/pages/client/WelcomePage.tsx b/src/app/pages/client/WelcomePage.tsx index b807501aa..fa41483a1 100644 --- a/src/app/pages/client/WelcomePage.tsx +++ b/src/app/pages/client/WelcomePage.tsx @@ -3,6 +3,7 @@ import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds'; import { Page, PageHero, PageHeroSection } from '../../components/page'; import pkg from '../../../../package.json'; import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; + const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); export function WelcomePage() { -- 2.47.3 From 0aef410f602f088c82fdff88f5110dc4f94879bd Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 2 Aug 2026 19:01:05 -0400 Subject: [PATCH 3/3] fixed retarded prettier 'error' --- src/app/pages/auth/AuthLayout.tsx | 2 +- src/app/pages/client/WelcomePage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/auth/AuthLayout.tsx b/src/app/pages/auth/AuthLayout.tsx index e69630086..b57f82984 100644 --- a/src/app/pages/auth/AuthLayout.tsx +++ b/src/app/pages/auth/AuthLayout.tsx @@ -31,7 +31,7 @@ import { AuthServerProvider } from '../../hooks/useAuthServer'; import { tryDecodeURIComponent } from '../../utils/dom'; import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); const currentAuthPath = (pathname: string): string => { if (matchPath(LOGIN_PATH, pathname)) { diff --git a/src/app/pages/client/WelcomePage.tsx b/src/app/pages/client/WelcomePage.tsx index fa41483a1..20dfe3b4c 100644 --- a/src/app/pages/client/WelcomePage.tsx +++ b/src/app/pages/client/WelcomePage.tsx @@ -4,7 +4,7 @@ import { Page, PageHero, PageHeroSection } from '../../components/page'; import pkg from '../../../../package.json'; import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl() ,'/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); export function WelcomePage() { return ( -- 2.47.3