mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 20:13:57 +00:00
open server connection when opening DB connection
This commit is contained in:
@@ -187,6 +187,10 @@ export const getPinnedDatabases = () => _.compact(pinnedDatabasesValue);
|
|||||||
let currentDatabaseValue = null;
|
let currentDatabaseValue = null;
|
||||||
currentDatabase.subscribe(value => {
|
currentDatabase.subscribe(value => {
|
||||||
currentDatabaseValue = value;
|
currentDatabaseValue = value;
|
||||||
|
if (value?.connection?._id) {
|
||||||
|
openedConnections.update(x => _.uniq([...x, value?.connection?._id]));
|
||||||
|
expandedConnections.update(x => _.uniq([...x, value?.connection?._id]));
|
||||||
|
}
|
||||||
invalidateCommands();
|
invalidateCommands();
|
||||||
});
|
});
|
||||||
export const getCurrentDatabase = () => currentDatabaseValue;
|
export const getCurrentDatabase = () => currentDatabaseValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user