feat(ui): add Mod+B shortcut to toggle sidebar

This commit is contained in:
t8y2 committed 2026-06-09 10:38:03 +08:00
1 parent 171c7cd8d7
commit def1cacf77
9 files changed
+25 -1

No files matched your search

+7
View File
@@ -51,6 +51,7 @@ import {
isResetZoomShortcut,
isRefreshDataShortcut,
isSaveShortcut,
isToggleSidebarShortcut,
isZoomInShortcut,
isZoomOutShortcut,
} from "@/lib/keyboardShortcuts";
@@ -790,6 +791,12 @@ function handleKeydown(e: KeyboardEvent) {
void newQuery();
return;
}
if (isToggleSidebarShortcut(e, shortcuts)) {
e.preventDefault();
e.stopPropagation();
setSidebarOpen(!sidebarOpen.value);
return;
}
if (isCloseTabShortcut(e, shortcuts)) {
e.preventDefault();
if (showDriverStore.value) {