diff --git a/apps/desktop-tauri/src/i18n/keys.ts b/apps/desktop-tauri/src/i18n/keys.ts index 448b3a1df0..b6e448b86f 100644 --- a/apps/desktop-tauri/src/i18n/keys.ts +++ b/apps/desktop-tauri/src/i18n/keys.ts @@ -6,8 +6,9 @@ export const ALL_LOCALE_KEYS = [ "TabGeneral", - "TabProviders", - "TabDisplay", + "TabNotifications", + "TabMenuBar", + "TabMenu", "TabApiKeys", "TabCookies", "TabAdvanced", diff --git a/apps/desktop-tauri/src/surfaces/Settings.tsx b/apps/desktop-tauri/src/surfaces/Settings.tsx index 34fda3f73e..a1b02221e4 100644 --- a/apps/desktop-tauri/src/surfaces/Settings.tsx +++ b/apps/desktop-tauri/src/surfaces/Settings.tsx @@ -52,20 +52,26 @@ const TabIcons: Record = { ), - providers: ( + notifications: ( - - - - + + ), - display: ( + menuBar: ( ), + menu: ( + + + + + + + ), advanced: ( @@ -83,13 +89,11 @@ const TabIcons: Record = { ), }; -// Tab order mirrors upstream PreferencesView (General, Providers, Display, -// Advanced, About). Per-provider credential management (API keys, cookies, -// token accounts) is handled inside the Providers tab. const TAB_META: { id: SettingsTab; labelKey: LocaleKey }[] = [ { id: "general", labelKey: "TabGeneral" }, - { id: "providers", labelKey: "TabProviders" }, - { id: "display", labelKey: "TabDisplay" }, + { id: "notifications", labelKey: "TabNotifications" }, + { id: "menuBar", labelKey: "TabMenuBar" }, + { id: "menu", labelKey: "TabMenu" }, { id: "advanced", labelKey: "TabAdvanced" }, { id: "about", labelKey: "TabAbout" }, ]; @@ -104,7 +108,7 @@ const SETTINGS_WINDOW_PROVIDERS_WIDTH = 600; async function applySettingsWindowSize(tab: SettingsTab) { const requestedWidth = - tab === "providers" + tab === "general" ? SETTINGS_WINDOW_PROVIDERS_WIDTH : SETTINGS_WINDOW_DEFAULT_WIDTH; const workArea = await getWorkAreaRect().catch(() => null); @@ -193,7 +197,7 @@ export default function Settings({ state, initialTab: propTab }: { state: Bootst return (
{/* custom title bar (decorations disabled for guaranteed dark theme) */}
@@ -244,20 +248,26 @@ export default function Settings({ state, initialTab: propTab }: { state: Bootst )} {/* tab panels */} -
+
{activeTab === "general" && ( - + <> + + + )} - {activeTab === "providers" && ( - + {activeTab === "notifications" && ( + + )} + {activeTab === "menuBar" && ( + )} - {activeTab === "display" && ( - + {activeTab === "menu" && ( + )} {activeTab === "advanced" && ( diff --git a/apps/desktop-tauri/src/surfaces/settings/tabs/DisplayTab.tsx b/apps/desktop-tauri/src/surfaces/settings/tabs/DisplayTab.tsx index 782e4ab41e..36ef7376e2 100644 --- a/apps/desktop-tauri/src/surfaces/settings/tabs/DisplayTab.tsx +++ b/apps/desktop-tauri/src/surfaces/settings/tabs/DisplayTab.tsx @@ -9,7 +9,12 @@ function clampWindowScalePercent(value: number): number { return Math.min(250, Math.max(100, Number.isFinite(value) ? value : 100)); } -export default function DisplayTab({ settings, set, saving }: TabProps) { +export default function DisplayTab({ + mode = "menu", + settings, + set, + saving, +}: TabProps & { mode?: "menuBar" | "menu" }) { const { t } = useLocale(); const [windowScaleDraft, setWindowScaleDraft] = useState(() => clampWindowScalePercent(settings.windowScalePercent), @@ -28,7 +33,7 @@ export default function DisplayTab({ settings, set, saving }: TabProps) { return ( <> {/* ── Menu bar ─────────────────────────────────────────────── */} -
+ {mode === "menuBar" &&

{t("MenuBar")}

-
+
} {/* ── Menu content ─────────────────────────────────────────── */} -
+ {mode === "menu" &&

Menu Content

-
+
} - + {mode === "menu" && ( + + )} ); } diff --git a/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.test.tsx b/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.test.tsx index 8a4cb5a1e0..ee9825a098 100644 --- a/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.test.tsx +++ b/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.test.tsx @@ -103,7 +103,14 @@ describe("GeneralTab language picker", () => { it("updates the predictive pace warning preference", () => { const set = vi.fn(); - render(); + render( + , + ); fireEvent.click(screen.getByRole("checkbox", { name: "PredictivePaceWarnings" })); diff --git a/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.tsx b/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.tsx index 8262695dac..2533058542 100644 --- a/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.tsx +++ b/apps/desktop-tauri/src/surfaces/settings/tabs/GeneralTab.tsx @@ -24,7 +24,12 @@ const REFRESH_CADENCE_OPTIONS: { value: string; label: string }[] = [ { value: "3600", label: "1 hour" }, ]; -export default function GeneralTab({ settings, set, saving }: TabProps) { +export default function GeneralTab({ + mode = "general", + settings, + set, + saving, +}: TabProps & { mode?: "general" | "notifications" }) { const { t } = useLocale(); const [playingSound, setPlayingSound] = useState(false); const [languageOptions, setLanguageOptions] = useState( @@ -45,7 +50,7 @@ export default function GeneralTab({ settings, set, saving }: TabProps) { return ( <> -
+ {mode === "general" &&

{t("SectionLanguage")}

@@ -60,9 +65,9 @@ export default function GeneralTab({ settings, set, saving }: TabProps) { />
-
+
} -
+ {mode === "general" &&

{t("StartupSettings")}

@@ -84,9 +89,9 @@ export default function GeneralTab({ settings, set, saving }: TabProps) { />
-
+
} -
+ {mode === "notifications" &&

{t("SectionNotifications")}

@@ -146,9 +151,9 @@ export default function GeneralTab({ settings, set, saving }: TabProps) { )}
- + } -
+ {mode === "notifications" &&

{t("SectionUsageThresholds")}

@@ -180,10 +185,10 @@ export default function GeneralTab({ settings, set, saving }: TabProps) { />
- + } {/* ── Automation ───────────────────────────────────────────── */} -
+ {mode === "general" &&

{t("SectionRefresh")}

-
+
} ); } diff --git a/apps/desktop-tauri/src/types/bridge.ts b/apps/desktop-tauri/src/types/bridge.ts index 5e0eae2d9a..c0b7b90851 100644 --- a/apps/desktop-tauri/src/types/bridge.ts +++ b/apps/desktop-tauri/src/types/bridge.ts @@ -2,8 +2,9 @@ export type SurfaceMode = "hidden" | "trayPanel" | "popOut" | "settings"; export type VisibleSurfaceMode = Exclude; export type SettingsTabId = | "general" - | "providers" - | "display" + | "notifications" + | "menuBar" + | "menu" | "advanced" | "about"; diff --git a/rust/src/locale.rs b/rust/src/locale.rs index ba3bb09d64..d0252b2bb6 100644 --- a/rust/src/locale.rs +++ b/rust/src/locale.rs @@ -158,8 +158,9 @@ locale_keys! { // Tab names (Preferences) TabGeneral, - TabProviders, - TabDisplay, + TabNotifications, + TabMenuBar, + TabMenu, TabApiKeys, TabCookies, TabAdvanced, diff --git a/rust/src/locale/en-US.ftl b/rust/src/locale/en-US.ftl index 60bc49f659..237ce874b7 100644 --- a/rust/src/locale/en-US.ftl +++ b/rust/src/locale/en-US.ftl @@ -1,6 +1,7 @@ TabGeneral = General -TabProviders = Providers -TabDisplay = Display +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = API Keys TabCookies = Cookies TabAdvanced = Advanced diff --git a/rust/src/locale/es-MX.ftl b/rust/src/locale/es-MX.ftl index 0613daf453..f19f2d770a 100644 --- a/rust/src/locale/es-MX.ftl +++ b/rust/src/locale/es-MX.ftl @@ -1,6 +1,7 @@ TabGeneral = General -TabProviders = Proveedores -TabDisplay = Pantalla +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = Claves API TabCookies = Cookies TabAdvanced = Avanzado diff --git a/rust/src/locale/ja-JP.ftl b/rust/src/locale/ja-JP.ftl index acb4e8986b..b4314ddcfc 100644 --- a/rust/src/locale/ja-JP.ftl +++ b/rust/src/locale/ja-JP.ftl @@ -1,6 +1,7 @@ TabGeneral = 一般 -TabProviders = プロバイダー -TabDisplay = 表示 +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = API Keys TabCookies = Cookies TabAdvanced = 詳細 diff --git a/rust/src/locale/ko-KR.ftl b/rust/src/locale/ko-KR.ftl index fa87f6436e..5f456ae1ec 100644 --- a/rust/src/locale/ko-KR.ftl +++ b/rust/src/locale/ko-KR.ftl @@ -1,6 +1,7 @@ TabGeneral = 일반 -TabProviders = 제공업체 -TabDisplay = 디스플레이 +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = API 키 TabCookies = 쿠키 TabAdvanced = 고급 diff --git a/rust/src/locale/zh-CN.ftl b/rust/src/locale/zh-CN.ftl index 331a9f8456..5740f151da 100644 --- a/rust/src/locale/zh-CN.ftl +++ b/rust/src/locale/zh-CN.ftl @@ -1,6 +1,7 @@ TabGeneral = 通用 -TabProviders = 服务商 -TabDisplay = 显示 +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = API 密钥 TabCookies = Cookie TabAdvanced = 高级 diff --git a/rust/src/locale/zh-TW.ftl b/rust/src/locale/zh-TW.ftl index fe3b2c0097..8ae2962a4e 100644 --- a/rust/src/locale/zh-TW.ftl +++ b/rust/src/locale/zh-TW.ftl @@ -1,6 +1,7 @@ TabGeneral = 一般 -TabProviders = 提供者 -TabDisplay = 顯示 +TabNotifications = Notifications +TabMenuBar = Menu Bar +TabMenu = Menu TabApiKeys = API 金鑰 TabCookies = Cookie TabAdvanced = 高階