Files
UHD_Media_Tool/apps/web/app/components/settings/library.tsx
T
rootandClaude Opus 5.5 4480fc346d refactor(copy): 术语统一——收录版本、模型服务、智能体等(DEAI-2)
- 版本目标 → 收录版本(前后端用户可见字符串、能力描述、给模型的提示)
- Agent 上游 / 上游 → 模型服务;界面上的 Agent / Agent 会话 → 智能体 / 智能体会话
- 身份歧义 / 识别有歧义 / 无法确定作品 → 没识别出作品;待识别(池) → 未识别
- 建档 → 加入媒体库;资产 → 文件;库根 → 媒体库目录;纳管 → 本工具 / 外部任务;
  哨兵 → 标记文件 / 检查目录;站点快照 → 抓取;Feed / RSS 订阅 / 来源健康 → RSS
- 代码标识符、API 字段名、迁移文件不改;glossary.md 同步;smoke 选择器跟随

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 20:35:43 +08:00

53 lines
1.7 KiB
TypeScript

import { LibraryRootsTable } from "./instances.tsx";
import { NamingSection } from "./naming.tsx";
import { str } from "./resource-section.tsx";
import { SettingsBlock } from "./settings-block.tsx";
import { type CardSpec, SettingsCard, SettingsGate } from "./settings-card.tsx";
// 媒体库与目录:库根(含哨兵状态)+ 默认整理方式 + 命名模板
const ORGANIZE_CARD: CardSpec = {
anchor: "organize",
title: "整理方式",
description: "复制入库时源文件留在缓存继续做种,保留天数在自动化分区设置。",
fields: [
{
name: "organize.defaultMode",
label: "默认整理方式",
kind: "select",
options: [
{ value: "copy", label: "复制(源文件继续做种)" },
{ value: "move", label: "移动(移走源文件)" },
],
},
{
name: "organize.allowCrossVolumeMove",
label: "允许跨卷移动",
kind: "switch",
hint: "跨卷时按复制 → 核验 → 删源执行",
},
],
fromSettings: (s) => ({
"organize.defaultMode": s.organize.defaultMode,
"organize.allowCrossVolumeMove": s.organize.allowCrossVolumeMove,
}),
toPatch: (v) => ({
organize: {
defaultMode: str(v["organize.defaultMode"]) as "copy" | "move",
allowCrossVolumeMove: v["organize.allowCrossVolumeMove"] === true,
},
}),
};
export function LibrarySection() {
return (
<div className="grid grid-cols-1 gap-8">
<SettingsBlock section="library" anchor="roots" title="媒体库目录" plain>
<LibraryRootsTable />
</SettingsBlock>
<SettingsGate>{(s) => <SettingsCard section="library" spec={ORGANIZE_CARD} settings={s} />}</SettingsGate>
<NamingSection />
</div>
);
}