feat(下载对话框): 学 MoviePilot 重做手动下载对话框

- 标题区:海报、作品名 (年份)、站点;资源行显示原始标题、促销、H&R、做种 / 下载、大小、发布时间
- 下载器与保存目录并排下拉,缺省「自动」,下方写明「将保存到」的实际路径;保留「自定义路径」
- 作品身份折叠区:类型 + TMDB 编号(可搜索作品),未识别时默认展开,指定后随下载绑定
- 已有版本先显示一行摘要,选一次性洗版才展开勾选列表
- 搜索、工作台、原站视图三处调用方补传资源字段

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 12:10:03 +08:00
1 parent 4bb19433ad
commit 6e645bce8f
7 files changed
+1012 -117

No files matched your search

@@ -1,7 +1,28 @@
import type { AcquisitionSlot, WorkbenchRelease } from "@umt/contracts";
import { useSubmitRelease } from "~/api/releases.ts";
import { openAgentDrawer } from "~/components/agent/agent-store.ts";
import { ManualDownloadDialog } from "~/components/downloads/manual-download-dialog.tsx";
import { ManualDownloadDialog, type ManualDownloadResource } from "~/components/downloads/manual-download-dialog.tsx";
import { kindHintOf } from "~/components/downloads/manual-download-model.ts";
import { hrOf, promotionLabel } from "./release-fields.ts";
/** 站点资源 → 下载对话框的资源摘要(工作台与原站视图共用);过期的促销不显示 */
export function workbenchResource(r: WorkbenchRelease): ManualDownloadResource {
const promo = promotionLabel(r);
return {
title: r.title,
subtitle: r.subtitle,
sizeBytes: r.sizeBytes,
entityId: r.entity?.id,
entity: r.entity,
siteId: r.siteId,
seeders: r.seeders,
leechers: r.leechers,
promotion: promo && !promo.expired ? { label: promo.label, free: promo.free } : null,
hr: hrOf(r),
publishedAt: r.sourcePublishedAt,
kindHint: kindHintOf(r.parsed),
};
}
/** 工作台使用独立手动下载,不要求先建立订阅或收录版本。 */
export function DownloadDialog({
@@ -20,7 +41,7 @@ export function DownloadDialog({
key={release.id}
open={open}
onOpenChange={onOpenChange}
resource={{ title: release.title, sizeBytes: release.sizeBytes, entityId: release.entity?.id }}
resource={workbenchResource(release)}
onDelegate={() =>
openAgentDrawer({
label: `资源:${release.title}`,