From a96a84d509d4873aade2d293a00b5b82fbeab2c5 Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Fri, 13 Jun 2025 16:31:22 +0200 Subject: [PATCH] SYNC: grayed scripts for non active database --- packages/web/src/appobj/AppObjectCore.svelte | 6 +++++ .../appobj/PublicCloudFileAppObject.svelte | 3 +++ packages/web/src/stores.ts | 22 +++++++++++++++++++ plugins/dbgate-plugin-firebird/package.json | 2 +- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/packages/web/src/appobj/AppObjectCore.svelte b/packages/web/src/appobj/AppObjectCore.svelte index 29bc7f4d0..24463411b 100644 --- a/packages/web/src/appobj/AppObjectCore.svelte +++ b/packages/web/src/appobj/AppObjectCore.svelte @@ -15,6 +15,7 @@ export let module = null; export let isBold = false; + export let isGrayed = false; export let isChoosed = false; export let isBusy = false; export let statusIcon = undefined; @@ -93,6 +94,7 @@
{#if data.description}
diff --git a/packages/web/src/stores.ts b/packages/web/src/stores.ts index 5dfdb4c99..c2ff2c159 100644 --- a/packages/web/src/stores.ts +++ b/packages/web/src/stores.ts @@ -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); diff --git a/plugins/dbgate-plugin-firebird/package.json b/plugins/dbgate-plugin-firebird/package.json index 5af25c58e..353d75f47 100644 --- a/plugins/dbgate-plugin-firebird/package.json +++ b/plugins/dbgate-plugin-firebird/package.json @@ -38,7 +38,7 @@ "wkx": "^0.5.0", "pg-copy-streams": "^6.0.6", "node-firebird": "^1.1.9", - "dbgate-query-splitter": "^4.11.3", + "dbgate-query-splitter": "^4.11.5", "dbgate-tools": "^6.0.0-alpha.1", "lodash": "^4.17.21", "pg": "^8.11.5"