From a5d9addbf30fb190b91d5fb29b4fdcd21248c795 Mon Sep 17 00:00:00 2001
From: t8y2 <1156263951@qq.com>
Date: Tue, 9 Jun 2026 17:51:07 +0800
Subject: [PATCH] feat(ui): show instant tooltips for truncated labels
---
.../src/components/layout/EditorToolbar.vue | 9 +-
.../src/components/sidebar/TreeItem.vue | 232 +++++++++---------
.../components/ui/TruncatedTextTooltip.vue | 46 ++++
3 files changed, 170 insertions(+), 117 deletions(-)
create mode 100644 apps/desktop/src/components/ui/TruncatedTextTooltip.vue
diff --git a/apps/desktop/src/components/layout/EditorToolbar.vue b/apps/desktop/src/components/layout/EditorToolbar.vue
index e97b7b014..20a3f1a2c 100644
--- a/apps/desktop/src/components/layout/EditorToolbar.vue
+++ b/apps/desktop/src/components/layout/EditorToolbar.vue
@@ -18,6 +18,7 @@ import { Button } from "@/components/ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { SearchableSelect } from "@/components/ui/searchable-select";
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
+import TruncatedTextTooltip from "@/components/ui/TruncatedTextTooltip.vue";
import DatabaseIcon from "@/components/icons/DatabaseIcon.vue";
import { useConnectionStore } from "@/stores/connectionStore";
import { useDatabaseOptions } from "@/composables/useDatabaseOptions";
@@ -254,7 +255,7 @@ function connectionById(connectionId: string): ConnectionConfig | undefined {
- {{ label }}
+
@@ -278,7 +279,11 @@ function connectionById(connectionId: string): ConnectionConfig | undefined {
if (open && activeConnection) loadDatabaseOptions(activeConnection.id).catch(() => {});
}
"
- />
+ >
+
+
+
+