app exit - mac

This commit is contained in:
Jan Prochazka
2022-04-14 11:05:33 +02:00
parent 0187bb74ee
commit 5a42e8e963
3 changed files with 57 additions and 27 deletions

View File

@@ -29,6 +29,7 @@ import { apiCall } from '../utility/api';
import runCommand from './runCommand';
import { openWebLink } from '../utility/exportFileTools';
import { getSettings } from '../utility/metadataLoaders';
import { isMac } from '../utility/common';
// function themeCommand(theme: ThemeDefinition) {
// return {
@@ -97,7 +98,7 @@ registerCommand({
toolbarOrder: 2,
name: 'Query',
toolbarName: 'New query',
keyText: 'CtrlOrCommand+Q',
keyText: 'CtrlOrCommand+T',
onClick: () => newQuery(),
});
@@ -457,9 +458,10 @@ if (hasPermission('settings/change')) {
registerCommand({
id: 'file.exit',
category: 'File',
name: 'Exit',
name: isMac() ? 'Quit DbGate' : 'Exit',
keyText: isMac() ? 'Command+Q' : null,
testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('close-window'),
onClick: () => getElectron().send('quit-app'),
});
registerCommand({