From 47cc49038dd4ae1f376428d2514fcf81e8b94113 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 20 May 2026 10:25:31 +0800 Subject: [PATCH] auto-sync: 2026-05-20 10:25:31 --- src/frontend/src/App.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 308898d..54176de 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -37,6 +37,18 @@ export default function App() { return () => stopPolling(); }, []); + // ⌘K / Ctrl+K 全局搜索 + useEffect(() => { + const handler = (e: KeyboardEvent) => { + if ((e.metaKey || e.ctrlKey) && e.key === 'k') { + e.preventDefault(); + setShowSearch(true); + } + }; + window.addEventListener('keydown', handler); + return () => window.removeEventListener('keydown', handler); + }, []); + const tasks = liveStatus?.tasks || []; const moziTasks = tasks.filter(isEdict); const activeTasks = moziTasks.filter((t) => !isArchived(t));