From e96d8890bcef9c1f9d0c6abada0dcb44f3e74097 Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 29 Sep 2026 13:37:30 +0800 Subject: [PATCH] feat(sidebar): express connection state via icon brightness and grayscale --- apps/desktop/src/components/sidebar/TreeItem.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/sidebar/TreeItem.vue b/apps/desktop/src/components/sidebar/TreeItem.vue index ffbe7533ec..c70af7029a 100644 --- a/apps/desktop/src/components/sidebar/TreeItem.vue +++ b/apps/desktop/src/components/sidebar/TreeItem.vue @@ -966,6 +966,10 @@ const tableSearchValue = computed(() => { const isConnecting = computed(() => activeNode.value.type === "connection" && !!activeNode.value.connectionId && connectionStore.connectingIds.has(activeNode.value.connectionId)); +// Navicat-style activation cue: the connection icon itself is full color when +// connected and grayed out when not, complementing the trailing green dot. +const connectionIconInactiveClass = computed(() => (activeNode.value.type === "connection" && activeNode.value.connectionId && !connectionStore.connectedIds.has(activeNode.value.connectionId) ? "grayscale opacity-45" : "")); + const isConnectionReadonly = computed(() => activeNode.value.type === "connection" && !!activeNode.value.connectionId && (connectionStore.getConfig(activeNode.value.connectionId)?.read_only ?? false)); const databaseOpenVisual = computed(() => { @@ -1651,8 +1655,8 @@ function onKeydown(event: KeyboardEvent) { - - + +