@@ -7,7 +7,10 @@ import { useCommand } from "@/context/command"
77import { DESKTOP_MENU , desktopMenuVisible , type DesktopMenuAction , type DesktopMenuEntry } from "@/desktop-menu"
88import { usePlatform } from "@/context/platform"
99
10- export function WindowsAppMenu ( props : { command : ReturnType < typeof useCommand > ; platform : ReturnType < typeof usePlatform > } ) {
10+ export function WindowsAppMenu ( props : {
11+ command : ReturnType < typeof useCommand >
12+ platform : ReturnType < typeof usePlatform >
13+ } ) {
1114 let lastFocused : HTMLElement | undefined
1215
1316 const rememberFocus = ( ) => {
@@ -57,18 +60,20 @@ export function WindowsAppMenu(props: { command: ReturnType<typeof useCommand>;
5760 < DropdownMenu . GroupLabel class = "desktop-app-menu-heading" > OpenCode</ DropdownMenu . GroupLabel >
5861 { DESKTOP_MENU . filter ( ( menu ) => desktopMenuVisible ( menu , "windows" ) ) . map ( ( menu ) => (
5962 < DesktopMenuSubmenu label = { menu . label } >
60- { menu . items ?. filter ( ( entry ) => desktopMenuVisible ( entry , "windows" ) ) . map ( ( entry ) =>
61- entry . type === "separator" ? (
62- < DropdownMenu . Separator />
63- ) : (
64- < DesktopMenuItem
65- label = { entry . label ?? "" }
66- keybind = { entry . command ? props . command . keybind ( entry . command ) : entry . accelerator ?. windows }
67- disabled = { entry . command ? commandDisabled ( entry . command ) : false }
68- onSelect = { ( ) => runEntry ( entry ) }
69- />
70- ) ,
71- ) }
63+ { menu . items
64+ ?. filter ( ( entry ) => desktopMenuVisible ( entry , "windows" ) )
65+ . map ( ( entry ) =>
66+ entry . type === "separator" ? (
67+ < DropdownMenu . Separator />
68+ ) : (
69+ < DesktopMenuItem
70+ label = { entry . label ?? "" }
71+ keybind = { entry . command ? props . command . keybind ( entry . command ) : entry . accelerator ?. windows }
72+ disabled = { entry . command ? commandDisabled ( entry . command ) : false }
73+ onSelect = { ( ) => runEntry ( entry ) }
74+ />
75+ ) ,
76+ ) }
7277 </ DesktopMenuSubmenu >
7378 ) ) }
7479 </ DropdownMenu . Group >
0 commit comments