mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 10:25:59 +00:00
separate schema selector in frontend
This commit is contained in:
@@ -2,6 +2,7 @@ import _ from 'lodash';
|
||||
import { recentDatabases, currentDatabase, getRecentDatabases } from '../stores';
|
||||
import registerCommand from './registerCommand';
|
||||
import { getConnectionLabel } from 'dbgate-tools';
|
||||
import { switchCurrentDatabase } from '../utility/common';
|
||||
|
||||
currentDatabase.subscribe(value => {
|
||||
if (!value) return;
|
||||
@@ -17,7 +18,7 @@ currentDatabase.subscribe(value => {
|
||||
function switchDatabaseCommand(db) {
|
||||
return {
|
||||
text: `${db.name} on ${getConnectionLabel(db?.connection, { allowExplicitDatabase: false })}`,
|
||||
onClick: () => currentDatabase.set(db),
|
||||
onClick: () => switchCurrentDatabase(db),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user