mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 22:46:01 +00:00
SYNC: grayed scripts for non active database
This commit is contained in:
committed by
Diflow
parent
3eb8863f67
commit
a96a84d509
@@ -463,4 +463,26 @@ cloudConnectionsStore.subscribe(value => {
|
||||
});
|
||||
export const getCloudConnectionsStore = () => cloudConnectionsStoreValue;
|
||||
|
||||
export const currentActiveCloudTags = derived(currentDatabase, $currentDatabase => {
|
||||
if (!$currentDatabase || !$currentDatabase.connection) return [];
|
||||
const engine = $currentDatabase.connection?.engine;
|
||||
const [shortName, packageName] = engine.split('@');
|
||||
const tags = [shortName];
|
||||
const res = [...tags];
|
||||
|
||||
if (tags.includes('mariadb')) {
|
||||
res.push('mysql');
|
||||
}
|
||||
if (tags.includes('mysql')) {
|
||||
res.push('mariadb');
|
||||
}
|
||||
if (tags.includes('cockroach')) {
|
||||
res.push('postgres');
|
||||
}
|
||||
if (tags.includes('libsql')) {
|
||||
res.push('sqlite');
|
||||
}
|
||||
return res;
|
||||
});
|
||||
|
||||
window['__changeCurrentTheme'] = theme => currentTheme.set(theme);
|
||||
|
||||
Reference in New Issue
Block a user