diff --git a/packages/app/src/components/left-sidebar.tsx b/packages/app/src/components/left-sidebar.tsx index 8bc4540a2..f8df25b51 100644 --- a/packages/app/src/components/left-sidebar.tsx +++ b/packages/app/src/components/left-sidebar.tsx @@ -101,9 +101,9 @@ interface SidebarSharedProps { interface SidebarLabels { addProject: string; newWorkspace: string; + hosts: string; home: string; settings: string; - switchHost: string; searchHosts: string; sessions: string; schedules: string; @@ -226,9 +226,9 @@ export const LeftSidebar = memo(function LeftSidebar() { (): SidebarLabels => ({ addProject: t("sidebar.actions.addProject"), newWorkspace: t("sidebar.actions.newWorkspace"), + hosts: t("sidebar.actions.hosts"), home: t("sidebar.actions.home"), settings: t("sidebar.actions.settings"), - switchHost: t("sidebar.host.switchTitle"), searchHosts: t("sidebar.host.searchPlaceholder"), sessions: t("sidebar.sections.sessions"), schedules: t("sidebar.sections.schedules"), @@ -301,47 +301,58 @@ function FooterIconButton({ buttonRef, onPress, testID, - accessibilityLabel, + label, icon: Icon, iconSize, + shortcutKeys, theme, }: { onPress: () => void; testID: string; - accessibilityLabel: string; + label: string; icon: typeof FolderPlus; iconSize?: number; + shortcutKeys?: ReturnType; theme: SidebarTheme; buttonRef?: RefObject; }) { return ( - - {({ hovered }) => ( - - )} - + + + + {({ hovered }) => ( + + )} + + + + + + ); } function SidebarHostPicker({ theme, + label, onAddHost, onOpenHostSettings, }: { theme: SidebarTheme; + label: string; onAddHost: () => void; onOpenHostSettings: (serverId: string) => void; }) { @@ -380,7 +391,7 @@ function SidebarHostPicker({ buttonRef={triggerRef} onPress={handleOpen} testID="sidebar-hosts-trigger" - accessibilityLabel="Hosts" + label={label} icon={Server} iconSize={theme.iconSize.sm} theme={theme} @@ -389,22 +400,7 @@ function SidebarHostPicker({ ); } -function AddProjectTooltipContent({ - newAgentKeys, - label, -}: { - newAgentKeys: ReturnType; - label: string; -}) { - return ( - - {label} - {newAgentKeys ? : null} - - ); -} - -function HeaderIconTooltipContent({ +function IconTooltipContent({ label, shortcutKeys, }: { @@ -489,50 +485,47 @@ function SidebarFooter({ handleSettings: () => void; labels: { addProject: string; + hosts: string; home: string; settings: string; - switchHost: string; searchHosts: string; }; handleAddHost: () => void; handleOpenHostSettings: (serverId: string) => void; }) { const newAgentKeys = useShortcutKeys("new-agent"); + const settingsKeys = useShortcutKeys("toggle-settings"); return ( - - - - - - - - + @@ -876,7 +869,7 @@ function WorkspacesSectionHeader() { - + @@ -886,7 +879,7 @@ function WorkspacesSectionHeader() { - + diff --git a/packages/app/src/i18n/resources.test.ts b/packages/app/src/i18n/resources.test.ts index 52867c76a..19a17acdc 100644 --- a/packages/app/src/i18n/resources.test.ts +++ b/packages/app/src/i18n/resources.test.ts @@ -370,6 +370,7 @@ describe("translation resources", () => { expect(en.sidebar.host.switchTitle).toBe("Switch host"); expect(en.sidebar.host.searchPlaceholder).toBe("Search hosts..."); expect(en.sidebar.actions.addProject).toBe("Add project"); + expect(en.sidebar.actions.hosts).toBe("Hosts"); expect(en.sidebar.actions.home).toBe("Home"); expect(en.sidebar.actions.settings).toBe("Settings"); expect(en.sidebar.actions.closeSidebar).toBe("Close sidebar"); diff --git a/packages/app/src/i18n/resources/ar.ts b/packages/app/src/i18n/resources/ar.ts index 09ccba2f4..b48585470 100644 --- a/packages/app/src/i18n/resources/ar.ts +++ b/packages/app/src/i18n/resources/ar.ts @@ -782,6 +782,7 @@ export const ar: TranslationResources = { actions: { addProject: "إضافة مشروع", newWorkspace: "مساحة عمل جديدة", + hosts: "المضيفون", home: "بيت", settings: "إعدادات", closeSidebar: "إغلاق الشريط الجانبي", diff --git a/packages/app/src/i18n/resources/en.ts b/packages/app/src/i18n/resources/en.ts index 66ae84aaf..abf7dff6a 100644 --- a/packages/app/src/i18n/resources/en.ts +++ b/packages/app/src/i18n/resources/en.ts @@ -789,6 +789,7 @@ export const en = { actions: { addProject: "Add project", newWorkspace: "New workspace", + hosts: "Hosts", home: "Home", settings: "Settings", closeSidebar: "Close sidebar", diff --git a/packages/app/src/i18n/resources/es.ts b/packages/app/src/i18n/resources/es.ts index 1c1efbb12..b1ca990c1 100644 --- a/packages/app/src/i18n/resources/es.ts +++ b/packages/app/src/i18n/resources/es.ts @@ -809,6 +809,7 @@ export const es: TranslationResources = { actions: { addProject: "Agregar proyecto", newWorkspace: "Nuevo espacio de trabajo", + hosts: "Hosts", home: "Hogar", settings: "Ajustes", closeSidebar: "Cerrar barra lateral", diff --git a/packages/app/src/i18n/resources/fr.ts b/packages/app/src/i18n/resources/fr.ts index 5a42a8858..614957bc9 100644 --- a/packages/app/src/i18n/resources/fr.ts +++ b/packages/app/src/i18n/resources/fr.ts @@ -808,6 +808,7 @@ export const fr: TranslationResources = { actions: { addProject: "Ajouter un projet", newWorkspace: "Nouvel espace de travail", + hosts: "Hôtes", home: "Maison", settings: "Paramètres", closeSidebar: "Fermer la barre latérale", diff --git a/packages/app/src/i18n/resources/ja.ts b/packages/app/src/i18n/resources/ja.ts index 14612aa4e..cdd7001ac 100644 --- a/packages/app/src/i18n/resources/ja.ts +++ b/packages/app/src/i18n/resources/ja.ts @@ -794,6 +794,7 @@ export const ja: TranslationResources = { actions: { addProject: "プロジェクトを追加", newWorkspace: "新しいワークスペース", + hosts: "ホスト", home: "ホーム", settings: "設定", closeSidebar: "サイドバーを閉じる", diff --git a/packages/app/src/i18n/resources/pt-BR.ts b/packages/app/src/i18n/resources/pt-BR.ts index a7a124be8..f57e7e31b 100644 --- a/packages/app/src/i18n/resources/pt-BR.ts +++ b/packages/app/src/i18n/resources/pt-BR.ts @@ -800,6 +800,7 @@ export const ptBR: TranslationResources = { actions: { addProject: "Adicionar projeto", newWorkspace: "Novo workspace", + hosts: "Hosts", home: "Início", settings: "Configurações", closeSidebar: "Fechar barra lateral", diff --git a/packages/app/src/i18n/resources/ru.ts b/packages/app/src/i18n/resources/ru.ts index 7fed4d9a7..e5868a3ec 100644 --- a/packages/app/src/i18n/resources/ru.ts +++ b/packages/app/src/i18n/resources/ru.ts @@ -801,6 +801,7 @@ export const ru: TranslationResources = { actions: { addProject: "Добавить проект", newWorkspace: "Новое рабочее пространство", + hosts: "Хосты", home: "Дом", settings: "Настройки", closeSidebar: "Закрыть боковую панель", diff --git a/packages/app/src/i18n/resources/zh-CN.ts b/packages/app/src/i18n/resources/zh-CN.ts index 6eb6adefb..f07bfe2f3 100644 --- a/packages/app/src/i18n/resources/zh-CN.ts +++ b/packages/app/src/i18n/resources/zh-CN.ts @@ -777,6 +777,7 @@ export const zhCN: TranslationResources = { actions: { addProject: "添加 project", newWorkspace: "新建工作区", + hosts: "Hosts", home: "首页", settings: "设置", closeSidebar: "关闭侧边栏",