From ebb2937a3846a1cd6fa5ddad6676e17c4aa042f8 Mon Sep 17 00:00:00 2001 From: N0VAN0M4LY <224130499+N0VAN0M4LY@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:53:04 +0800 Subject: [PATCH] feat(launcher): add wordmark logo, ellipsis tooltips, auto-dismiss errors and online wording Replace the title bar text mark with the white WTOffline wordmark SVG, add a window-level floating tooltip for truncated ellipsis text, auto-dismiss and manually close global error banners, and replace retail wording with online edition terminology across both locales and isolation patch titles. --- apps/launcher/src/renderer/src/App.tsx | 37 +++++- .../src/components/EllipsisTooltipHost.tsx | 110 ++++++++++++++++++ .../src/renderer/src/components/Wordmark.tsx | 36 ++++++ .../src/renderer/src/i18n/locales/en.json | 39 ++++--- .../src/renderer/src/i18n/locales/zh-CN.json | 41 ++++--- .../renderer/src/pages/copies/CopyList.tsx | 2 +- .../renderer/src/pages/copies/CopySummary.tsx | 2 +- .../src/pages/home/BackgroundSwitch.tsx | 4 +- .../src/renderer/src/pages/home/HomeSide.tsx | 4 +- .../src/renderer/src/shell/BottomBar.tsx | 6 +- .../src/renderer/src/shell/TitleBar.tsx | 3 +- .../src/renderer/src/styles/controls.css | 56 ++++++++- .../src/renderer/src/styles/shell.css | 32 ++--- .../src/renderer/src/useErrorMessage.ts | 25 ++-- .../exe/isolation/registry-key/patch.jsonc | 2 +- .../user-data-folder-name/patch.jsonc | 2 +- 16 files changed, 332 insertions(+), 69 deletions(-) create mode 100644 apps/launcher/src/renderer/src/components/EllipsisTooltipHost.tsx create mode 100644 apps/launcher/src/renderer/src/components/Wordmark.tsx diff --git a/apps/launcher/src/renderer/src/App.tsx b/apps/launcher/src/renderer/src/App.tsx index f93a536..90eb343 100644 --- a/apps/launcher/src/renderer/src/App.tsx +++ b/apps/launcher/src/renderer/src/App.tsx @@ -4,6 +4,7 @@ import type { IpcOutput } from '@shared/ipc/contract.ts'; import type { Copies } from '@shared/schemas/install.ts'; import type { LaunchState } from '@shared/schemas/launch.ts'; import type { Settings } from '@shared/schemas/settings.ts'; +import { EllipsisTooltipHost } from './components/EllipsisTooltipHost.tsx'; import { Sheet } from './components/Sheet.tsx'; import { applyLanguage, resolveLanguage } from './i18n/index.ts'; import { ipcInvoke, ipcOn } from './ipc.ts'; @@ -57,7 +58,8 @@ interface View { */ export function App({ info, initialSettings, initialCopies }: AppProps) { const { t } = useTranslation(); - const { message, report } = useErrorMessage(); + const { error, report, clear: clearError } = useErrorMessage(); + const [errorPaused, setErrorPaused] = useState(false); const [settings, setSettings] = useState(initialSettings); const [registry, setRegistry] = useState(initialCopies); const record = registry.copies.find((copy) => copy.id === registry.current) ?? null; @@ -89,7 +91,16 @@ export function App({ info, initialSettings, initialCopies }: AppProps) { return () => { mounted = false; dispose(); }; }, [report]); - const go = (to: Destination): void => setRoute((current) => navigate(current, to)); + useEffect(() => { + if (!error || errorPaused) return; + const timer = window.setTimeout(clearError, 6000); + return () => window.clearTimeout(timer); + }, [error, errorPaused, clearError]); + + const go = (to: Destination): void => { + clearError(); + setRoute((current) => navigate(current, to)); + }; const selectCopy = (id: string, details = false): void => { ipcInvoke('copies:setCurrent', { id }).then(() => { if (details) go({ page: 'copies', section: 'summary' }); @@ -188,7 +199,26 @@ export function App({ info, initialSettings, initialCopies }: AppProps) { {view.main} - {message && {message}} + {error && ( + setErrorPaused(true)} + onMouseLeave={() => setErrorPaused(false)} + > + {error.message} + + × + + + )}
{message}