mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
command enabling refactor
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
category: 'Tabs',
|
||||
name: 'Next tab',
|
||||
keyText: 'Ctrl+Tab',
|
||||
enabledStore: derived(openedTabs, tabs => tabs.filter(x => !x.closedTime).length >= 2),
|
||||
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 2,
|
||||
onClick: () => {
|
||||
const tabs = get(openedTabs).filter(x => x.closedTime == null);
|
||||
if (tabs.length >= 2) setSelectedTab(tabs[tabs.length - 2].tabid);
|
||||
@@ -37,7 +37,7 @@
|
||||
import registerCommand from '../commands/registerCommand';
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
|
||||
import { currentDatabase, openedTabs } from '../stores';
|
||||
import { currentDatabase, getOpenedTabs, openedTabs } from '../stores';
|
||||
import { setSelectedTab } from '../utility/common';
|
||||
import contextMenu from '../utility/contextMenu';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user