chore(web): 合并 U / V / W 后的收尾——剩余「入库」文案、设置新分区深链、冒烟锚点

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-06 18:25:20 +08:00
1 parent ee3ebcb25c
commit f397687a5f
11 files changed
+31 -36

No files matched your search

+9 -9
View File
@@ -36,7 +36,7 @@ import { qk } from "~/lib/query-keys.ts";
import { useSse } from "~/lib/sse.ts";
import { cn } from "~/lib/utils.ts";
// 首页概览:自动化、存储与下载器状态,以及当前工作、要我处理的汇总计数(整理需要处理 / 等你批准 / 系统健康)和最近入库。
// 首页概览:自动化、存储与下载器状态,以及当前工作、要我处理的汇总计数(整理需要处理 / 等你批准 / 系统健康)和最近整理。
/** 首页关心的事件:任意一个到达就(节流)刷新聚合 */
const DASHBOARD_EVENTS = [
@@ -102,7 +102,7 @@ function Row({ children }: { children: ReactNode }) {
return <li className="flex min-w-0 items-center justify-between gap-3 py-1.5 text-sm">{children}</li>;
}
/** 非零项拼一句:[[3, "个下载"], [0, "个入库中"]] → "3 个下载" */
/** 非零项拼一句:[[3, "个下载"], [0, "个整理中"]] → "3 个下载" */
function nonZero(parts: [number, string][]): string {
return parts
.filter(([n]) => n > 0)
@@ -157,7 +157,7 @@ function StatusLine({ d }: { d: Dashboard }) {
) : a.readOnlyReconcile ? (
<>
只读模式:不会自动下载和整理。
<Link to={settingsPath("automation", "advanced")} className="underline underline-offset-4">
<Link to={settingsPath("system", "readonly")} className="underline underline-offset-4">
去设置关闭
</Link>
</>
@@ -211,7 +211,7 @@ function Busy({ w }: { w: Dashboard["currentWork"] }) {
const agents = w.agentRuns.slice(0, 2);
const summary = nonZero([
[w.downloading, "个下载中"],
[w.importing, "个入库中"],
[w.importing, "个整理中"],
[w.stalled, "个没有进展"],
[w.paused, "个已暂停"],
]);
@@ -275,14 +275,14 @@ function NeedsMe() {
);
}
// ─── 最近入库了什么:成功 / 部分成功的整理 ───
// ─── 最近整理了什么:成功 / 部分成功的整理 ───
function RecentImports({ d }: { d: Dashboard }) {
const rows = d.recentOutput.filter((r) => r.status === "succeeded" || r.status === "partial").slice(0, 6);
const today = d.automation.today.filesImported;
return (
<Section title="最近入库" icon={LibraryIcon} to={consolePath("organize")}>
<Section title="最近整理" icon={LibraryIcon} to={consolePath("organize")}>
{rows.length === 0 ? (
<EmptyState plain icon={LibraryIcon} title="最近没有新入库的作品" className="py-6" />
<EmptyState plain icon={LibraryIcon} title="最近没有新整理的作品" className="py-6" />
) : (
<ul className="divide-y divide-border/60">
{rows.map((r) => (
@@ -294,7 +294,7 @@ function RecentImports({ d }: { d: Dashboard }) {
<span className="block truncate">{r.title ?? r.targetPath?.split("/").pop() ?? "未关联作品"}</span>
{r.status === "partial" ? (
<span className="block text-meta text-warning">
{r.counts.succeeded}/{r.counts.total} 个文件入库
{r.counts.succeeded}/{r.counts.total} 个文件已整理
</span>
) : null}
</Link>
@@ -303,7 +303,7 @@ function RecentImports({ d }: { d: Dashboard }) {
))}
</ul>
)}
{today ? <p className="mt-auto pt-3 text-meta text-muted-foreground">今天入库 {today} 个文件</p> : null}
{today ? <p className="mt-auto pt-3 text-meta text-muted-foreground">今天整理 {today} 个文件</p> : null}
</Section>
);
}