From 399298d3bbe18661a6f2c13f42a7b23a42cd370e Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Tue, 6 Aug 2024 12:53:30 +0200 Subject: [PATCH] don't open new connection on startup, when new.connection is not enabled --- packages/web/src/utility/OpenTabsOnStartup.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/web/src/utility/OpenTabsOnStartup.svelte b/packages/web/src/utility/OpenTabsOnStartup.svelte index ae18fe1a..71009c5f 100644 --- a/packages/web/src/utility/OpenTabsOnStartup.svelte +++ b/packages/web/src/utility/OpenTabsOnStartup.svelte @@ -4,7 +4,7 @@ import runCommand from '../commands/runCommand'; import ErrorMessageModal from '../modals/ErrorMessageModal.svelte'; import { showModal } from '../modals/modalTools'; - import { openedTabs } from '../stores'; + import { commandsCustomized, openedTabs } from '../stores'; import { getConfig, getConnectionList, useFavorites } from './metadataLoaders'; 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({ title: 'New Connection', icon: 'img connection',