From 1f274c57e3c56433b8e08b9fc6121a7e83444cd9 Mon Sep 17 00:00:00 2001 From: zipg <4047349+zipg@users.noreply.github.com> Date: Tue, 1 Sep 2026 15:58:26 +0800 Subject: [PATCH] fix(sidebar): support Cmd or Ctrl R for refresh --- .../desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue index 85ebff839c..9fed88801a 100644 --- a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue +++ b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue @@ -119,7 +119,7 @@ import { copyDisplayPathForTreeNode, copyNameForTreeNode, isDirectNavigationTree import { customTypeCapabilities, supportsTypeObjectSource } from "@/lib/database/databaseObjectCapabilities"; import { mongoCollectionTableTypeFromNode, mongoCreateDatabasePreview, mongoDropIndexFailureCount } from "@/lib/sidebar/mongoCollectionMutation"; import { dataTabOpenModeFromTreeClick, type DataTabOpenMode } from "@/lib/sidebar/dataTabOpenPolicy"; -import { isCopySidebarSelectionShortcut, isEditSidebarConnectionShortcut, isPasteSidebarSelectionShortcut } from "@/lib/editor/keyboardShortcuts"; +import { isCopySidebarSelectionShortcut, isEditSidebarConnectionShortcut, isModRShortcut, isPasteSidebarSelectionShortcut } from "@/lib/editor/keyboardShortcuts"; import { handleSidebarTreeDeleteShortcut } from "@/lib/sidebar/sidebarTreeDeleteShortcut"; import { dataTableDoubleClickAction } from "@/lib/tabs/dataTabActivation"; import { attachedDatabaseNameFromPath, buildCreateDatabaseSql, buildDuckDbAttachDatabaseSql, buildSqliteAttachDatabaseSql, supportsCreateDatabaseCharset, uniqueAttachedDatabaseName } from "@/lib/database/createDatabaseSql"; @@ -1145,7 +1145,7 @@ function onKeydown(event: KeyboardEvent) { event.stopPropagation(); return; } - if (!event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey && event.key === "F5") { + if (isModRShortcut(event) || (!event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey && event.key === "F5")) { if (!requestRefreshSelectedNode()) return; event.preventDefault(); event.stopPropagation();