mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 07:06:00 +00:00
pro tabs
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
1
packages/web/src/tabs/index-pro.js
Normal file
1
packages/web/src/tabs/index-pro.js
Normal file
@@ -0,0 +1 @@
|
||||
export default {};
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user