This commit is contained in:
Jan Prochazka
2024-06-24 16:20:44 +02:00
parent 6cdbfd1a89
commit db8b8feb3e
4 changed files with 9 additions and 0 deletions

View File

@@ -158,6 +158,7 @@
function getTabDbName(tab, connectionList) {
if (tab.tabComponent == 'ConnectionTab') return 'Connections';
if (tab.tabComponent?.startsWith('Admin')) return 'Administration';
if (tab.props && tab.props.conid && tab.props.database) return tab.props.database;
if (tab.props && tab.props.conid) {
const connection = connectionList?.find(x => x._id == tab.props.conid);
@@ -174,6 +175,7 @@
if (key.startsWith('archive://')) return 'icon archive';
if (key.startsWith('server://')) return 'icon server';
if (key.startsWith('connections.')) return 'icon connection';
if (key.startsWith('admin.')) return 'icon admin';
}
return 'icon file';
}

View File

@@ -0,0 +1 @@
export default {};

View File

@@ -30,6 +30,8 @@ import * as ProfilerTab from './ProfilerTab.svelte';
import * as DataDuplicatorTab from './DataDuplicatorTab.svelte';
import * as ImportExportTab from './ImportExportTab.svelte';
import protabs from './index-pro';
export default {
TableDataTab,
CollectionDataTab,
@@ -62,4 +64,5 @@ export default {
ProfilerTab,
DataDuplicatorTab,
ImportExportTab,
...protabs,
};

View File

@@ -152,6 +152,9 @@ export function getTabDbKey(tab) {
if (tab.tabComponent == 'ConnectionTab') {
return 'connections.';
}
if (tab.tabComponent?.startsWith('Admin')) {
return 'admin.';
}
if (tab.props && tab.props.conid && tab.props.database) {
return `database://${tab.props.database}-${tab.props.conid}`;
}