feat: add Check for Updates command to native menu and Cmd+K palette

- Add APP_CHECK_FOR_UPDATES constant and menu item in menu.rs (between About and Settings)
- Wire onCheckForUpdates handler through useMenuEvents and useAppCommands
- Add test for app-check-for-updates dispatch
This commit is contained in:
lucaronin
2026-03-03 13:19:09 +01:00
parent 4499fe0ca3
commit 0eeb45e16e
4 changed files with 18 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ export interface MenuEventHandlers {
onSearch: () => void
onGoBack?: () => void
onGoForward?: () => void
onCheckForUpdates?: () => void
activeTabPathRef: React.MutableRefObject<string | null>
handleCloseTabRef: React.MutableRefObject<(path: string) => void>
activeTabPath: string | null
@@ -58,6 +59,7 @@ function dispatchActiveTabEvent(id: string, h: MenuEventHandlers): boolean {
function dispatchOptionalEvent(id: string, h: MenuEventHandlers): boolean {
if (id === 'view-go-back') { h.onGoBack?.(); return true }
if (id === 'view-go-forward') { h.onGoForward?.(); return true }
if (id === 'app-check-for-updates') { h.onCheckForUpdates?.(); return true }
return false
}