refactor(web): 技术信息折叠铺到媒体库 / 审计 / 运行状态,清理正常态徽章与解释型页描述(DEAI-2)

- 媒体库详情:作品 UUID 进技术信息;「实际路径与库根」改「文件位置」,正常态(已核验、
  可访问、主位置)不加徽章;外部身份显示「TMDB 90228 · 你确认的 / 自动匹配」,修订号进悬停;
  元数据字段来源默认收起(「显示来源」,跟随界面设置);别名默认只列中英文与手动加的;
  「内容单元」→「季与集」,「临时单元」→「编号待确认」;侧栏与页标题统一「媒体库」
- 审计:动作列不再重复英文码,对象列显示中文类型 / 能力名,ID 只在详情;补 capability.denied
- 运行状态:进程、已下线实例、趋势图与最大表收进折叠区;图例同名序列加序号,不再拼接
- 站点卡:账号正常与登录方式不加徽章,健康不显示毫秒,限流移出卡片
- 文件管理:目录「正常」徽章与重复的剩余空间去掉;已登记 → 已入库,临时文件 → 未完成
- 规则:「修订」列改「最后修改」;不支持的关键字合成一行;页签改「默认规则 / 自动收新作品 / 已忽略」;
  默认规则说明去掉「带层」等算法描述
- 站点 Passkey 与登录用通行密钥区分命名;命令面板提示去重
- 删解释型页描述(审计、搜索、下载、下载计划、RSS、规则、媒体库、运行状态、站点、任务、计划、整理)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-29 20:58:38 +08:00
1 parent 5a717e414c
commit 57ce40168d
31 files changed
+253 -209

No files matched your search

+30 -8
View File
@@ -1,4 +1,4 @@
import { AuditAction, type AuditEvent } from "@umt/contracts";
import { AuditAction, type AuditEvent, CAPABILITY_CATALOG, type KnownCapabilityId } from "@umt/contracts";
import { X } from "lucide-react";
import { useEffect, useState } from "react";
import { useSearchParams } from "react-router";
@@ -40,7 +40,8 @@ const ACTION_LABEL: Record<string, string> = {
"schedule.skip": "跳过定时任务",
"acquisition_plan.manual_submit": "手动提交下载计划",
"engine.run_retry": "重跑任务",
"capability.invoke": "智能体调用能力",
"capability.invoke": "智能体操作",
"capability.denied": "智能体操作被拒绝",
"site.created": "登记站点",
"site.updated": "修改站点",
"feed_source.created": "新建 RSS",
@@ -64,6 +65,29 @@ const NOUN: Record<string, string> = {
schedule: "定时任务",
automation_grant: "持续授权",
};
const TARGET_LABEL: Record<string, string> = {
...NOUN,
admin_user: "管理员",
api_key: "API Key",
settings: "设置",
secret: "凭证",
site: "站点",
site_account: "站点账号",
feed_source: "RSS",
engine_run: "任务",
acquisition_plan: "下载计划",
download_task: "下载任务",
media_entity: "作品",
source_release: "资源",
organization_record: "整理记录",
file: "文件",
capability: "能力",
};
/** 对象列:能力显示中文名,其余显示对象类型;ID 只在详情里 */
function targetText(type: string, id: string | null): string {
if (type === "capability" && id) return CAPABILITY_CATALOG[id as KnownCapabilityId]?.title ?? id;
return TARGET_LABEL[type] ?? type;
}
function actionLabel(a: string): string {
if (ACTION_LABEL[a]) return ACTION_LABEL[a];
const [noun, verb] = a.split(".");
@@ -132,7 +156,7 @@ export default function AuditPage() {
return (
<>
<PageHeader title="审计" description="登录、设置、密钥与实例变更,新的在前。不记录凭证内容。" />
<PageHeader title="审计" />
<FilterBar
search={{ value: target, onChange: setTarget, placeholder: "对象类型,如 downloader_instance" }}
onReset={
@@ -188,7 +212,6 @@ export default function AuditPage() {
cell: (r) => (
<div className="min-w-0">
<p className="font-medium">{actionLabel(r.action)}</p>
<p className="font-mono text-meta text-muted-foreground">{r.action}</p>
</div>
),
},
@@ -199,10 +222,9 @@ export default function AuditPage() {
hideBelow: "md",
cell: (r) =>
r.targetType ? (
<div className="min-w-0 max-w-[18rem]">
<p className="truncate">{r.targetType}</p>
<p className="truncate font-mono text-meta text-muted-foreground">{r.targetId}</p>
</div>
<p className="min-w-0 max-w-[18rem] truncate" title={`${r.targetType} · ${r.targetId ?? ""}`}>
{targetText(r.targetType, r.targetId)}
</p>
) : (
"—"
),