mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 00:36:00 +00:00
don't open new connection on startup, when new.connection is not enabled
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
import runCommand from '../commands/runCommand';
|
import runCommand from '../commands/runCommand';
|
||||||
import ErrorMessageModal from '../modals/ErrorMessageModal.svelte';
|
import ErrorMessageModal from '../modals/ErrorMessageModal.svelte';
|
||||||
import { showModal } from '../modals/modalTools';
|
import { showModal } from '../modals/modalTools';
|
||||||
import { openedTabs } from '../stores';
|
import { commandsCustomized, openedTabs } from '../stores';
|
||||||
|
|
||||||
import { getConfig, getConnectionList, useFavorites } from './metadataLoaders';
|
import { getConfig, getConnectionList, useFavorites } from './metadataLoaders';
|
||||||
import openNewTab from './openNewTab';
|
import openNewTab from './openNewTab';
|
||||||
@@ -49,7 +49,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$openedTabs.find(x => x.closedTime == null) && !(await getConnectionList()).find(x => !x.unsaved)) {
|
if (
|
||||||
|
!$openedTabs.find(x => x.closedTime == null) &&
|
||||||
|
!(await getConnectionList()).find(x => !x.unsaved) &&
|
||||||
|
$commandsCustomized['new.connection']?.enabled
|
||||||
|
) {
|
||||||
openNewTab({
|
openNewTab({
|
||||||
title: 'New Connection',
|
title: 'New Connection',
|
||||||
icon: 'img connection',
|
icon: 'img connection',
|
||||||
|
|||||||
Reference in New Issue
Block a user