import { Activity, AlertTriangle, CircleCheck, HardDrive, ListTodo, Radio, Sparkles } from "lucide-react"; import { useHealth } from "~/api/health.ts"; import { EmptyState } from "~/components/console/empty-state.tsx"; import { PageHeader } from "~/components/console/page-header.tsx"; import { StatusBadge } from "~/components/console/status-badge.tsx"; import { formatDateTime } from "~/lib/utils.ts"; // 首页六区块(REQ §13.4.3),W3 接入正式状态投影 const SECTIONS = [ { title: "自动化概览", icon: Sparkles, hint: "今日新增、升级与已核验入库" }, { title: "当前工作", icon: Activity, hint: "正在搜索/下载/整理/核验的目标" }, { title: "需要我处理", icon: AlertTriangle, hint: "根因级事项与剩余决策" }, { title: "缓存与保留", icon: HardDrive, hint: "使用率、在途预留与可清理量" }, { title: "来源健康", icon: Radio, hint: "站点、qB、Emby、模型上游" }, { title: "最近产出", icon: ListTodo, hint: "新增的集与版本、整理前后路径" }, ]; function ServiceStatus() { const { data, isPending, isError, error } = useHealth(); if (isPending) return 检查中; if (isError) return 服务不可达:{error.message}; return (
服务{data.status === "ok" ? "正常" : "降级"} 数据库 {data.db === "ok" ? "正常" : data.db === "down" ? "不可用" : "未知"} v{data.version} · {data.role} · {formatDateTime(data.time)}
); } export default function Home() { return ( <> } />
{SECTIONS.map((s) => (

{s.title}

))}
); }