From 32f865ff52963a52bdb1c7ef89903cf0a58b76cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=AB=E8=AE=B2=E6=A2=B5?= Date: Mon, 29 Jun 2026 18:27:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(context-menu):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E4=B8=8E=E5=85=B3=E9=97=AD=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E4=BD=8D=E7=BD=AE=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/desktop/src/components/sidebar/TreeItem.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/components/sidebar/TreeItem.vue b/apps/desktop/src/components/sidebar/TreeItem.vue index 85c2bb3457..ebb76183f5 100644 --- a/apps/desktop/src/components/sidebar/TreeItem.vue +++ b/apps/desktop/src/components/sidebar/TreeItem.vue @@ -3672,6 +3672,10 @@ function treeItemMenuItems(): ContextMenuItem[] { // 4. Database / Schema if (node.type === "database" || node.type === "schema") { + if (canCloseDatabaseConnection.value) { + items.push({ label: t("contextMenu.closeDatabaseConnection"), action: closeDatabaseConnection, icon: Unplug }); + items.push({ label: "", separator: true }); + } items.push({ label: t("contextMenu.copyName"), action: copyName, icon: Copy, shortcut: shortcutCopyName.value }); items.push({ label: "", separator: true }); if (canOpenObjectBrowser.value) { @@ -3723,10 +3727,6 @@ function treeItemMenuItems(): ContextMenuItem[] { items.push({ label: t("diff.title"), action: openSchemaDiff, icon: ArrowRightLeft }); items.push({ label: t("dataCompare.title"), action: openDataCompare, icon: ArrowRightLeft }); items.push({ label: t("contextMenu.exportDatabase"), action: openDatabaseExport, icon: Upload }); - if (canCloseDatabaseConnection.value) { - items.push({ label: "", separator: true }); - items.push({ label: t("contextMenu.closeDatabaseConnection"), action: closeDatabaseConnection, icon: Unplug }); - } if (canDropDatabase.value || canDropSchema.value) { items.push({ label: "", separator: true }); }