mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 13:53:59 +00:00
fix
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
<script lang="ts" context="module">
|
<script lang="ts" context="module">
|
||||||
|
const electron = getElectron();
|
||||||
|
|
||||||
const closeTabFunc = closeCondition => tabid => {
|
const closeTabFunc = closeCondition => tabid => {
|
||||||
openedTabs.update(files => {
|
openedTabs.update(files => {
|
||||||
const active = files.find(x => x.tabid == tabid);
|
const active = files.find(x => x.tabid == tabid);
|
||||||
@@ -103,7 +105,7 @@
|
|||||||
id: 'tabs.closeTab',
|
id: 'tabs.closeTab',
|
||||||
category: 'Tabs',
|
category: 'Tabs',
|
||||||
name: 'Close tab',
|
name: 'Close tab',
|
||||||
keyText: 'Ctrl+W',
|
keyText: electron ? 'Ctrl+W' : null,
|
||||||
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 1,
|
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 1,
|
||||||
onClick: closeCurrentTab,
|
onClick: closeCurrentTab,
|
||||||
});
|
});
|
||||||
@@ -137,6 +139,7 @@
|
|||||||
import { setSelectedTab } from '../utility/common';
|
import { setSelectedTab } from '../utility/common';
|
||||||
import contextMenu from '../utility/contextMenu';
|
import contextMenu from '../utility/contextMenu';
|
||||||
import getConnectionLabel from '../utility/getConnectionLabel';
|
import getConnectionLabel from '../utility/getConnectionLabel';
|
||||||
|
import getElectron from '../utility/getElectron';
|
||||||
import { getConnectionInfo, useConnectionList } from '../utility/metadataLoaders';
|
import { getConnectionInfo, useConnectionList } from '../utility/metadataLoaders';
|
||||||
import { duplicateTab } from '../utility/openNewTab';
|
import { duplicateTab } from '../utility/openNewTab';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user