This commit is contained in:
Jan Prochazka
2021-09-28 08:31:38 +02:00
parent e7634a2521
commit 1c8e69225d

View File

@@ -1,4 +1,6 @@
<script lang="ts" context="module">
const electron = getElectron();
const closeTabFunc = closeCondition => tabid => {
openedTabs.update(files => {
const active = files.find(x => x.tabid == tabid);
@@ -103,7 +105,7 @@
id: 'tabs.closeTab',
category: 'Tabs',
name: 'Close tab',
keyText: 'Ctrl+W',
keyText: electron ? 'Ctrl+W' : null,
testEnabled: () => getOpenedTabs().filter(x => !x.closedTime).length >= 1,
onClick: closeCurrentTab,
});
@@ -137,6 +139,7 @@
import { setSelectedTab } from '../utility/common';
import contextMenu from '../utility/contextMenu';
import getConnectionLabel from '../utility/getConnectionLabel';
import getElectron from '../utility/getElectron';
import { getConnectionInfo, useConnectionList } from '../utility/metadataLoaders';
import { duplicateTab } from '../utility/openNewTab';