fix: 文件与作品页的低优先级问题(FIX-7)
- 文件列表「主文件」只认视频扩展名(字幕自成资产时位置 is_primary 也为真) - 行内悬浮操作只在鼠标悬浮时出现,选中行不再常驻遮挡大小/时间 - 种子详情按识别状态说人话,解析结果 JSON 跟随技术信息默认收起 - 作品页空收录版本写「没设收录要求」,版本行写「库里有 N 个版本」 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
23bd8cfe45
commit
3c17fa3356
6 files changed
+48
-14
No files matched your search
@@ -13,6 +13,7 @@ import { KvList } from "~/components/console/kv-list.tsx";
|
||||
import { StatusBadge } from "~/components/console/status-badge.tsx";
|
||||
import { Button } from "~/components/ui/button.tsx";
|
||||
import { errorMessage } from "~/lib/api.ts";
|
||||
import { useUiPrefs } from "~/lib/ui-prefs.ts";
|
||||
import { formatBytes, formatDateTime } from "~/lib/utils.ts";
|
||||
import { DownloadDialog } from "./download-dialog.tsx";
|
||||
import { absTime, categoryLabel, countText, ORIGIN_LABEL, relTime, snatchedOf } from "./release-fields.ts";
|
||||
@@ -28,13 +29,21 @@ const DECISION_LABEL = {
|
||||
deferred: { label: "延后:已有计划在途", tone: "warning" },
|
||||
} as const;
|
||||
|
||||
/** 没关联作品时按识别状态说一句(原码不上屏) */
|
||||
const UNLINKED_TEXT: Record<string, string> = {
|
||||
unresolved: "还没识别作品。",
|
||||
ambiguous: "有多个可能的作品,没有自动关联。",
|
||||
unidentifiable: "没识别出作品。",
|
||||
rejected: "识别结果已被排除。",
|
||||
};
|
||||
|
||||
/** 本地库存 + 候选理由(来自作品详情:Slot / CandidateEvaluation),不从标题猜 */
|
||||
function LocalInventory({ release, entry }: { release: WorkbenchRelease; entry: InventoryEntry | undefined }) {
|
||||
const detail = useEntityDetail(release.entity?.id);
|
||||
if (!release.entity) {
|
||||
return (
|
||||
<p className="text-caption text-muted-foreground">
|
||||
未关联本地作品({release.resolutionStatus})。
|
||||
{UNLINKED_TEXT[release.resolutionStatus] ?? "未关联本地作品。"}
|
||||
<Link to="/console/identity" className="ml-1 underline underline-offset-4">
|
||||
去指定作品
|
||||
</Link>
|
||||
@@ -123,6 +132,7 @@ export function ReleaseDetailSheet({
|
||||
const refresh = useRefreshReleaseDetail();
|
||||
const entity = useEntityDetail(release?.entity?.id);
|
||||
const [dl, setDl] = useState(false);
|
||||
const techOpen = useUiPrefs().techInfoExpanded;
|
||||
const r = detail.data?.release ?? release;
|
||||
|
||||
// 按需抓详情页:打开抽屉时没有缓存的详情页扩展内容就抓一次(服务端缓存 24 小时,同一资源本次会话只自动抓一次)
|
||||
@@ -296,7 +306,8 @@ export function ReleaseDetailSheet({
|
||||
</DetailSection>
|
||||
) : null}
|
||||
|
||||
<JsonView label="解析结果" value={r.parsed} />
|
||||
{/* 原始解析 JSON 属于技术信息:默认收起,跟随设置 → 界面「技术信息默认展开」 */}
|
||||
<JsonView label="解析结果" value={r.parsed} defaultOpen={techOpen} />
|
||||
</>
|
||||
)}
|
||||
{r ? <DownloadDialog release={r} slots={entity.data?.slots ?? []} open={dl} onOpenChange={setDl} /> : null}
|
||||
|
||||
Reference in new issue
Block a user