fix: wire up File - Exit (was disabled and had no handler)

The File menu's Exit item was hard-disabled and its action had no case in the
menu dispatcher, so it did nothing. Enable it and route file.exit to QuitApp,
which runs the same graceful beforeClose shutdown as the window close button.
This commit is contained in:
2026-07-20 12:05:12 +02:00
parent 61c11c0fe3
commit 781fbfaa30
+3 -2
View File
@@ -41,7 +41,7 @@ import {
ChatAvailable, GetChatHistory, SendChatMessage, GetOnlineOperators, ChatAvailable, GetChatHistory, SendChatMessage, GetOnlineOperators,
QSOAudioBegin, QSOAudioCancel, QSOAudioRestart, QSOAudioResetClock, QSOAudioBegin, QSOAudioCancel, QSOAudioRestart, QSOAudioResetClock,
GetAwardDefs, GetAwardDefs,
GetUIPref, GetActiveProfile, GetUIPref, GetActiveProfile, QuitApp,
ReportLiveActivity, GetLiveStatusEnabled, LiveLastQSOAgeSec, ReportLiveActivity, GetLiveStatusEnabled, LiveLastQSOAgeSec,
} from '../wailsjs/go/main/App'; } from '../wailsjs/go/main/App';
import { Combobox } from '@/components/ui/combobox'; import { Combobox } from '@/components/ui/combobox';
@@ -2762,7 +2762,7 @@ export default function App() {
{ type: 'separator' }, { type: 'separator' },
{ type: 'item', label: t('file.deleteAll'), action: 'file.deleteall', disabled: total === 0 }, { type: 'item', label: t('file.deleteAll'), action: 'file.deleteall', disabled: total === 0 },
{ type: 'separator' }, { type: 'separator' },
{ type: 'item', label: t('file.exit'), action: 'file.exit', shortcut: 'Ctrl+Q', disabled: true }, { type: 'item', label: t('file.exit'), action: 'file.exit', shortcut: 'Ctrl+Q' },
]}, ]},
{ name: 'edit', label: t('menu.edit'), items: [ { name: 'edit', label: t('menu.edit'), items: [
{ type: 'item', label: t('edit.editSel'), action: 'edit.edit', shortcut: 'Enter', disabled: selectedId === null }, { type: 'item', label: t('edit.editSel'), action: 'edit.edit', shortcut: 'Enter', disabled: selectedId === null },
@@ -2807,6 +2807,7 @@ export default function App() {
case 'file.export': exportAdif(); break; case 'file.export': exportAdif(); break;
case 'file.exportCabrillo': exportCabrillo(); break; case 'file.exportCabrillo': exportCabrillo(); break;
case 'file.deleteall': setShowDeleteAll(true); break; case 'file.deleteall': setShowDeleteAll(true); break;
case 'file.exit': QuitApp(); break;
case 'view.refresh': refresh(); break; case 'view.refresh': refresh(); break;
case 'view.clearfilters': setFilterCallsign(''); setActiveFilter({ conditions: [], match: 'AND' }); break; case 'view.clearfilters': setFilterCallsign(''); setActiveFilter({ conditions: [], match: 'AND' }); break;
case 'edit.edit': if (selectedId !== null) openEdit(selectedId); break; case 'edit.edit': if (selectedId !== null) openEdit(selectedId); break;