feat: M5 外观特效选择+持久化(appearance:load/save IPC+config.json,鼠效 6 选格接 EffectEngine,重开恢复并接线)

This commit is contained in:
hunter-dev
2026-08-24 23:42:46 +08:00
parent 28755547c1
commit cf2600901b
9 changed files with 111 additions and 21 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export function App() {
const settings = useSettings();
const layout = useLayout();
useEffect(() => { loadVault(); loadTree(); restore(); appearance.preview(); }, []);
useEffect(() => { loadVault(); loadTree(); restore(); appearance.load(); }, []);
useEffect(() => { if (activeId && tabs.length > 0) { const t = tabs.find(x => x.id === activeId); if (t) openDoc(t.path).catch(() => {}); } }, []);
useGlobalHotkeys({ onNewDoc: () => {}, onSave: () => useStore.getState().saveNow(), onFocusSearch: () => { const el = document.querySelector('input[placeholder*="搜索"]') as HTMLInputElement; el?.focus(); }, onToggleOutline: () => layout.toggleOutline(), onCheat: () => setShowCheat(true), onSettings: () => setShowSettings(true) });