mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 08:26:01 +00:00
mac specific keyboard shortcuts #199
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
id: 'tabs.nextTab',
|
||||
category: 'Tabs',
|
||||
name: 'Next tab',
|
||||
keyText: 'Ctrl+Tab',
|
||||
keyText: 'CtrlOrCommand+Tab',
|
||||
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 2,
|
||||
onClick: () => {
|
||||
const tabs = get(openedTabs).filter(x => x.closedTime == null);
|
||||
@@ -124,7 +124,7 @@
|
||||
id: 'tabs.closeTab',
|
||||
category: 'Tabs',
|
||||
name: 'Close tab',
|
||||
keyText: isElectronAvailable() ? 'Ctrl+W' : null,
|
||||
keyText: isElectronAvailable() ? 'CtrlOrCommand+W' : null,
|
||||
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 1,
|
||||
onClick: closeCurrentTab,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<script context="module">
|
||||
function getCommandTitle(command) {
|
||||
let res = command.text;
|
||||
if (command.keyText || command.keyTextFromGroup) res += ` (${command.keyText || command.keyTextFromGroup})`;
|
||||
if (command.keyText || command.keyTextFromGroup) {
|
||||
res += ` (${formatKeyText(command.keyText || command.keyTextFromGroup)})`;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
@@ -15,6 +17,7 @@
|
||||
import getElectron from '../utility/getElectron';
|
||||
import { useFavorites } from '../utility/metadataLoaders';
|
||||
import ToolbarButton from '../buttons/ToolbarButton.svelte';
|
||||
import { formatKeyText } from '../utility/common';
|
||||
|
||||
const electron = getElectron();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user