removed dependencies on electron remote

This commit is contained in:
Jan Prochazka
2021-12-16 15:41:34 +01:00
parent 588b8b23f9
commit 3d841ef8fe
15 changed files with 87 additions and 54 deletions

View File

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