From d5113fa93e6ebe28f7ca6a7700ce4717549ffb64 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 17 Nov 2025 17:30:42 -0800 Subject: [PATCH] fix appmenu keys again --- .../features/titlebar/components/app-menu.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/renderer/features/titlebar/components/app-menu.tsx b/src/renderer/features/titlebar/components/app-menu.tsx index a4f9bdf6d..a272e313c 100644 --- a/src/renderer/features/titlebar/components/app-menu.tsx +++ b/src/renderer/features/titlebar/components/app-menu.tsx @@ -1,5 +1,5 @@ import isElectron from 'is-electron'; -import { ReactNode } from 'react'; +import { Fragment, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Link, useNavigate } from 'react-router'; @@ -107,7 +107,7 @@ export const AppMenu = () => { const menuConfig: MenuItem[] = [ { condition: privateMode, - id: 'private-mode', + id: 'private-mode-off', item: { icon: 'lock', iconColor: 'error', @@ -119,7 +119,7 @@ export const AppMenu = () => { }, { condition: !privateMode, - id: 'private-mode', + id: 'private-mode-on', item: { icon: 'lockOpen', label: t('page.appMenu.privateModeOn', { postProcess: 'sentenceCase' }), @@ -155,7 +155,7 @@ export const AppMenu = () => { }, { condition: collapsed, - id: 'sidebar-toggle', + id: 'sidebar-expand', item: { icon: 'panelRightOpen', id: 'expand-sidebar', @@ -167,7 +167,7 @@ export const AppMenu = () => { }, { condition: !collapsed, - id: 'sidebar-toggle', + id: 'sidebar-collapse', item: { icon: 'panelRightClose', id: 'collapse-sidebar', @@ -246,12 +246,17 @@ export const AppMenu = () => { case 'conditional-group': if (!item.condition) return null; return ( -
{item.items.map((subItem) => renderMenuItem(subItem))}
+
+ {item.items.map((subItem) => { + console.log(subItem.id); + return {renderMenuItem(subItem)}; + })} +
); case 'conditional-item': if (!item.condition) return null; - return renderMenuItem(item.item as MenuItem); + return {renderMenuItem(item.item as MenuItem)}; case 'custom': return
{item.component}
;