feat(shortcuts): open data in a new tab

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-07-15 21:43:03 +08:00
1 parent 75652b10fe
commit 11536da7e5
16 files changed
+265 -23

No files matched your search

@@ -80,7 +80,7 @@ import {
type SnippetSyncConfig,
type WebDavConfig,
} from "@/lib/backend/api";
import { eventToShortcut } from "@/lib/editor/keyboardShortcuts";
import { eventToModifierOnlyShortcut, eventToShortcut } from "@/lib/editor/keyboardShortcuts";
import { SHORTCUT_DEFINITIONS, findShortcutConflict, normalizeShortcutSettings, type ShortcutActionId } from "@/lib/editor/shortcutRegistry";
import { formatShortcutDisplay } from "@/lib/editor/shortcutDisplay";
import { normalizeSidebarHiddenTablePrefixes } from "@/lib/sidebar/sidebarTableNameDisplay";
@@ -1202,7 +1202,8 @@ function onShortcutKeydown(actionId: ShortcutActionId, event: KeyboardEvent) {
editingShortcutId.value = null;
return;
}
const shortcut = eventToShortcut(event);
const definition = SHORTCUT_DEFINITIONS.find((item) => item.id === actionId);
const shortcut = definition?.inputKind === "modifier-only" ? eventToModifierOnlyShortcut(event) : eventToShortcut(event);
if (!shortcut) return;
onShortcutChange(actionId, shortcut);
editingShortcutId.value = null;