feat: add search menu to all resources

This commit is contained in:
2023-08-06 00:33:06 +02:00
parent 32a7f89309
commit 0e0d26c939
12 changed files with 208 additions and 8 deletions

View File

@@ -102,7 +102,15 @@ export const KMenu = (
}
useEventListener("keydown", (ev: KeyboardEvent) => {
if (ev.key === "/" && ev.ctrlKey) {
if (ev.key === "k") {
if (ev?.target?.nodeName == "INPUT") {
return;
}
if (!visible.value) {
ev.preventDefault();
ev.stopPropagation();
}
visible.value = !visible.value;
}