feat(web): W3-1 login, session shell, home dashboard, settings, engine panel and audit pages

- /login: setup/login/TOTP states driven by server error codes, fixed-height error slot
- console layout: GET /auth/session gate, redirect to /login, account popover (change password, logout)
- home: six dashboard sections with SSE-driven refresh, automation switch and read-only reconcile toggle
- settings tabs: downloaders, media servers, library roots, path mappings, site credentials,
  API keys (one-time plaintext), Pi upstream, cache/organize/retention/budget, automation
- engine: runs list (status/name filters, cursor paging, stats tiles), run detail (step timeline,
  json payloads, signals, cancel)
- audit: filterable list with detail sheet
- vite: allow repo root in server.fs so deno-installed deps under node_modules/.deno load in dev

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-27 20:40:41 +08:00
1 parent ef73abe3df
commit 0dec0854df
21 files changed
+3905 -57

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { useQuery } from "@tanstack/react-query";
import type { Dashboard } from "@umt/contracts";
import { apiData } from "~/lib/api.ts";
import { qk } from "~/lib/query-keys.ts";
/** 首页聚合;SSE 事件触发 invalidate,另有 60 秒兜底轮询 */
export function useDashboard() {
return useQuery({
queryKey: qk.dashboard,
queryFn: ({ signal }) => apiData<Dashboard>("/dashboard", { signal }),
refetchInterval: 60_000,
});
}