close tab with confirmation on double ctrl+W

This commit is contained in:
SPRINX0\prochazka
2025-04-28 16:45:21 +02:00
parent 5f03340454
commit 0305a5dcef
4 changed files with 28 additions and 8 deletions

View File

@@ -261,7 +261,7 @@
id: 'tabs.closeTab',
category: 'Tabs',
name: _t('command.tabs.closeTab', { defaultMessage: 'Close tab' }),
keyText: isElectronAvailable() ? 'CtrlOrCommand+W' : 'CtrlOrCommand+Shift+W',
keyText: isElectronAvailable() ? 'CtrlOrCommand+W' : 'Alt+W',
testEnabled: () => {
const hasAnyOtherTab = getOpenedTabs().filter(x => !x.closedTime).length >= 1;
const hasAnyModalOpen = getOpenedModals().length > 0;