feat(subscriptions): 按 MP 收敛订阅默认值与表单

- 定时主动搜索默认关(DEFAULT_SEARCH_INTERVAL_HOURS = 0),新建 / 手动照常各搜一次,之后靠 RSS 与站点快照
- 多版本自动补全系统缺省改为关
- 表单:基础页 = 作品与范围、下载、洗版;收录版本、优先级、自动补全折叠到进阶页「多版本」
- 对照文档 §7.3 记录落实范围

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-02 22:34:48 +08:00
1 parent 709414778e
commit ed083fd138
12 files changed
+111 -74

No files matched your search

@@ -671,47 +671,11 @@ export function SubscriptionFormDialog({
</FormField>
</Section>
<Section title="收录版本">
{editing ? (
slotsQ.isPending ? (
<p className="text-caption text-muted-foreground">读取收录版本…</p>
) : subSlots.length === 0 ? (
<p className="text-caption text-muted-foreground">还没有收录版本。在对比视图里新建。</p>
) : (
<FormField label="顺序" htmlFor={f("order")} hint="第一个是主版本;其他版本按自动补全设置补齐">
<SlotOrderList
items={order ?? subSlots.map((s) => ({ id: s.id, name: s.name }))}
onChange={setOrderState}
disabled={pending}
/>
</FormField>
)
) : (
<FormField
label="模板"
htmlFor={f("tpl")}
hint={
target?.kind === "entity"
? "作品还没有收录版本时按模板顺序创建,第一个是主版本"
: "作品加入媒体库后按模板创建收录版本"
}
>
<Pick
id={f("tpl")}
value={d.policyRevisionId}
onChange={(v) => patch({ policyRevisionId: v })}
placeholder={defaultTpl ? `按已发布收录策略(${defaultTpl.title})` : "按已发布收录策略"}
options={templates.map((p) => ({
value: p.id,
label: `${p.title} r${p.revision}:${tplNames(p.id).join(" → ") || "无模板"}`,
}))}
/>
</FormField>
)}
<Section title="洗版">
<FormField
label="升级策略"
label="洗版"
htmlFor={f("upgrade")}
hint="作用于这个订阅的全部收录版本;已入库低于目标档位时继续找更好的"
hint="已入库的低于规则组最高档时继续找更好的,拿到最高档即完成"
>
<Pick
id={f("upgrade")}
@@ -826,18 +790,18 @@ export function SubscriptionFormDialog({
</FormField>
</Section>
<Section title="搜索与优先级">
<div className="grid gap-3 sm:grid-cols-3">
<Section title="搜索">
<div className="grid gap-3 sm:grid-cols-2">
<FormField
label="主动搜索间隔(小时)"
label="定时搜索间隔(小时)"
htmlFor={f("interval")}
error={err("searchIntervalHours")}
hint="0 表示不主动搜索"
hint="空或 0 = 不定时搜索:新建时搜一次,之后靠 RSS 和站点最新资源追更"
>
<Input
id={f("interval")}
inputMode="decimal"
placeholder="24"
placeholder="0"
value={d.searchIntervalHours}
aria-invalid={!!err("searchIntervalHours")}
onChange={(e) => patch({ searchIntervalHours: e.target.value })}
@@ -851,20 +815,65 @@ export function SubscriptionFormDialog({
onChange={(e) => patch({ stopAfter: e.target.value })}
/>
</FormField>
<FormField label="优先级" htmlFor={f("prio")} hint="只影响资源分配顺序">
<Pick
id={f("prio")}
value={d.priority}
onChange={(v) => patch({ priority: (v || "tracking") as AcquisitionPriority })}
options={AcquisitionPriorityEnum.options.map((v) => ({ value: v, label: PRIORITY[v] }))}
/>
</FormField>
</div>
</Section>
<Section title="自动补全其他版本">
<AutoFillFields d={d} patch={patch} errors={errors} idPrefix={id} />
</Section>
<details className="group min-w-0 border-t border-border/60 pt-4">
<summary className="cursor-pointer text-meta font-semibold tracking-wide text-muted-foreground">
多版本(一般不用改)
</summary>
<div className="mt-3 space-y-5">
<Section title="收录版本">
{editing ? (
slotsQ.isPending ? (
<p className="text-caption text-muted-foreground">读取收录版本…</p>
) : subSlots.length === 0 ? (
<p className="text-caption text-muted-foreground">还没有收录版本。在对比视图里新建。</p>
) : (
<FormField label="顺序" htmlFor={f("order")} hint="第一个是主版本;其他版本按自动补全设置补齐">
<SlotOrderList
items={order ?? subSlots.map((s) => ({ id: s.id, name: s.name }))}
onChange={setOrderState}
disabled={pending}
/>
</FormField>
)
) : (
<FormField
label="模板"
htmlFor={f("tpl")}
hint={
target?.kind === "entity"
? "作品还没有收录版本时按模板顺序创建,第一个是主版本"
: "作品加入媒体库后按模板创建收录版本"
}
>
<Pick
id={f("tpl")}
value={d.policyRevisionId}
onChange={(v) => patch({ policyRevisionId: v })}
placeholder={defaultTpl ? `按已发布收录策略(${defaultTpl.title})` : "按已发布收录策略"}
options={templates.map((p) => ({
value: p.id,
label: `${p.title} r${p.revision}:${tplNames(p.id).join(" → ") || "无模板"}`,
}))}
/>
</FormField>
)}
<FormField label="优先级" htmlFor={f("prio")} hint="只影响下载排队先后">
<Pick
id={f("prio")}
value={d.priority}
onChange={(v) => patch({ priority: (v || "tracking") as AcquisitionPriority })}
options={AcquisitionPriorityEnum.options.map((v) => ({ value: v, label: PRIORITY[v] }))}
/>
</FormField>
</Section>
<Section title="自动补全其他版本">
<AutoFillFields d={d} patch={patch} errors={errors} idPrefix={id} />
</Section>
</div>
</details>
</TabsContent>
</Tabs>
<DialogFooter>