mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
focused DB UX
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import {
|
||||
currentDatabase,
|
||||
focusedConnectionOrDatabase,
|
||||
getActiveTab,
|
||||
getCurrentDatabase,
|
||||
getLockedDatabaseMode,
|
||||
@@ -78,6 +79,16 @@ export async function handleAfterTabClick() {
|
||||
}
|
||||
|
||||
currentDatabase.subscribe(currentDb => {
|
||||
if (currentDb) {
|
||||
focusedConnectionOrDatabase.set({
|
||||
conid: currentDb.connection?._id,
|
||||
database: currentDb.name,
|
||||
connection: currentDb.connection,
|
||||
});
|
||||
} else {
|
||||
focusedConnectionOrDatabase.set(null);
|
||||
}
|
||||
|
||||
if (!getLockedDatabaseMode()) return;
|
||||
if (!currentDb && !getAppLoaded()) return;
|
||||
openedTabs.update(tabs => {
|
||||
|
||||
Reference in New Issue
Block a user