connections UX

This commit is contained in:
SPRINX0\prochazka
2024-11-28 14:59:19 +01:00
parent 2283e91532
commit 48ec2bdac8
5 changed files with 106 additions and 92 deletions

View File

@@ -19,6 +19,7 @@
focusedConnectionOrDatabase,
getFocusedConnectionOrDatabase,
currentDatabase,
getCurrentConfig,
} from '../stores';
import runCommand from '../commands/runCommand';
import { filterName, getConnectionLabel } from 'dbgate-tools';
@@ -231,15 +232,18 @@
if (options.focusTab) {
openConnection(data.connection);
} else {
openNewTab({
title: getConnectionLabel(data.connection),
icon: 'img connection',
tabComponent: 'ConnectionTab',
tabPreviewMode: options.tabPreviewMode,
props: {
conid: data.conid,
},
});
const config = getCurrentConfig();
if (config.runAsPortal == false && !config.storageDatabase) {
openNewTab({
title: getConnectionLabel(data.connection),
icon: 'img connection',
tabComponent: 'ConnectionTab',
tabPreviewMode: options.tabPreviewMode,
props: {
conid: data.conid,
},
});
}
}
}
}}