feat(downloads): fold download plans into download panel (DL-3)
- Waiting plans (approval / disk space / automation off / queued) are
active-segment rows on /download-tasks/board, merged by created_at,
counted, with approve / cancel actions; ?plan= deep links and legacy
/downloads/plans routes redirect to the panel
- Download detail shows "why this download" (source, purpose, replaced
version, reasons); raw evaluation in tech info
- Failed / cancelled / expired plans appear in the entity download
history; rejected / revoked / expired approvals close draft plans
- New GET /acquisition-plans/{id}/why, POST /acquisition-plans/{id}/cancel
- User-facing copy no longer says 下载计划; glossary updated
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c0522f2531
commit
a9147e647d
50 files changed
+1535
-348
No files matched your search
@@ -150,7 +150,7 @@ export const ACTOR_TYPES = [
|
||||
];
|
||||
export const actorTypeLabel = (t: string) => ACTOR_TYPES.find((a) => a.value === t)?.label ?? t;
|
||||
|
||||
/** 下载计划 statusReason(`added`、`organize:succeeded` 等)→ 中文;不认识的原样显示 */
|
||||
/** 计划 statusReason(`added`、`organize:succeeded` 等)→ 中文;不认识的原样显示 */
|
||||
const PLAN_REASON: Record<string, string> = {
|
||||
added: "已添加到下载器",
|
||||
"organize:succeeded": "整理成功",
|
||||
|
||||
@@ -28,7 +28,7 @@ export function reasonCode(r: { code?: string | null; message?: string | null }
|
||||
return [c, m && looksLikeCode(m) && m !== c ? m : null].filter(Boolean).join(" · ") || null;
|
||||
}
|
||||
|
||||
/** 原因串里的内部码替换成人话(如下载计划 statusReason、任务 waitReason) */
|
||||
/** 原因串里的内部码替换成人话(如计划 statusReason、任务 waitReason) */
|
||||
export function humanizeReason(v: string | null | undefined): string | null {
|
||||
if (!v) return null;
|
||||
return looksLikeCode(v) ? reasonLine(v, v) : v;
|
||||
|
||||
Reference in new issue
Block a user