From e9db858dcc2d4a5a46bb3c03b03050420c160cb9 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Tue, 16 Jun 2026 05:50:44 -0400 Subject: [PATCH] feat(web): unified header for settings dialog, shorter sidebar labels - Add a shared section header (icon + title + description) with right padding so the dialog close X no longer overlaps panel content, and every tab now shares the same top layout for a consistent look. - Shorten inner sidebar nav labels (Models/API/Storage/Account) via new settingsDialog.nav.* i18n keys across all 8 locales. - Add common.apiIntegrationDescription and account.settingsDescription for the new header. --- .../settings-dialog/SettingsDialog.tsx | 37 +++++++++++++++---- web/src/i18n/locales/en-US.ts | 9 +++++ web/src/i18n/locales/es-ES.ts | 9 +++++ web/src/i18n/locales/ja-JP.ts | 9 +++++ web/src/i18n/locales/ru-RU.ts | 9 +++++ web/src/i18n/locales/th-TH.ts | 9 +++++ web/src/i18n/locales/vi-VN.ts | 9 +++++ web/src/i18n/locales/zh-Hans.ts | 8 ++++ web/src/i18n/locales/zh-Hant.ts | 8 ++++ 9 files changed, 100 insertions(+), 7 deletions(-) diff --git a/web/src/app/home/components/settings-dialog/SettingsDialog.tsx b/web/src/app/home/components/settings-dialog/SettingsDialog.tsx index 52b799c3..8984b643 100644 --- a/web/src/app/home/components/settings-dialog/SettingsDialog.tsx +++ b/web/src/app/home/components/settings-dialog/SettingsDialog.tsx @@ -79,33 +79,42 @@ export default function SettingsDialog({ const navItems: { id: SettingsSection; label: string; + title: string; + description: string; icon: React.ReactNode; }[] = [ { id: 'models', - label: t('models.title'), + label: t('settingsDialog.nav.models'), + title: t('models.title'), + description: t('models.description'), icon: , }, { id: 'apiIntegration', - label: t('common.apiIntegration'), + label: t('settingsDialog.nav.api'), + title: t('common.apiIntegration'), + description: t('common.apiIntegrationDescription'), icon: , }, { id: 'storageAnalysis', - label: t('storageAnalysis.title'), + label: t('settingsDialog.nav.storage'), + title: t('storageAnalysis.title'), + description: t('storageAnalysis.description'), icon: , }, { id: 'account', - label: t('account.settings'), + label: t('settingsDialog.nav.account'), + title: t('account.settings'), + description: t('account.settingsDescription'), icon: , }, ]; - const activeLabel = - navItems.find((item) => item.id === section)?.label ?? - t('settingsDialog.title'); + const activeItem = navItems.find((item) => item.id === section); + const activeLabel = activeItem?.title ?? t('settingsDialog.title'); return ( + {/* Unified section header (shared across all tabs). The extra + right padding keeps the title clear of the dialog's close X. */} +
+

+ {activeItem?.icon} + {activeItem?.title} +

+ {activeItem?.description && ( +

+ {activeItem.description} +

+ )} +
+
{section === 'models' && (