feat(sidebar): add copy name to database, schema and connection-group context menu

This commit is contained in:
haipengno1 2026-06-11 22:16:13 +08:00 committed by GitHub
parent c7fb855000
commit cee8cbb95a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -2697,6 +2697,8 @@ function treeItemMenuItems(): ContextMenuItem[] {
// 3. Connection Group
if (node.type === "connection-group") {
items.push({ label: t("contextMenu.copyName"), action: copyName, icon: Copy, shortcut: shortcutCopyName.value });
items.push({ label: "", separator: true });
items.push({ label: t("toolbar.newConnection"), action: newConnectionInGroup, icon: Plus });
items.push({ label: "", separator: true });
items.push({
@ -2718,6 +2720,8 @@ function treeItemMenuItems(): ContextMenuItem[] {
// 4. Database / Schema
if (node.type === "database" || node.type === "schema") {
items.push({ label: t("contextMenu.copyName"), action: copyName, icon: Copy, shortcut: shortcutCopyName.value });
items.push({ label: "", separator: true });
if (canOpenObjectBrowser.value) {
items.push({ label: t("contextMenu.openObjectBrowser"), action: openObjectBrowser, icon: TableProperties });
}