From 086278616e90a63395a275c84b5cb37b9ef2de71 Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Sat, 10 Oct 2026 14:07:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Scene=20VLM=20=E5=A7=8B=E7=BB=88?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=97=A0=20scenes=20=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20'=E2=80=94'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - Scene VLM 只在有 CUT 的文件上运行 - 没有 CUT 的文件不会生成 scenes.json - 前端检测到 total_scenes === 0 时,不显示 Scene VLM 行 - 用户看不到完整的处理流程 修复: - 移除 v-if 条件,始终显示 Scene VLM 行 - 修改 sceneVlmLabel 函数: - total_scenes > 0: 显示 '(X)' - total_scenes = 0: 显示 '—' - 添加 hasSceneVlm 函数,控制点击事件 - 添加 ms-proc-clickable 样式,提供视觉提示 影响: - 用户可以看到所有处理步骤 - 清楚知道 Scene VLM 不适用于该文件 - 更好的用户体验 测试: ✅ 编译通过 ✅ 无 scenes 的文件显示 '—' ✅ 有 scenes 的文件显示 '(X)' 并可点击查看详情 --- src/views/LibraryView.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/LibraryView.vue b/src/views/LibraryView.vue index 7acd1be..f1f3e09 100644 --- a/src/views/LibraryView.vue +++ b/src/views/LibraryView.vue @@ -330,10 +330,10 @@ {{ vlmSummaryLabel(ctxMenuFile?.file_uuid) }} -
+
{{ sceneVlmIcon(ctxMenuFile?.file_uuid) }} - {{ sceneVlmLabel(ctxMenuFile?.file_uuid) }} + {{ sceneVlmLabel(ctxMenuFile?.file_uuid) }}
@@ -1307,6 +1307,11 @@ function sceneVlmStats(fileUuid: string | undefined) { return getFileStats(fileUuid)?.scene_vlm || null } +function hasSceneVlm(fileUuid: string | undefined): boolean { + const s = sceneVlmStats(fileUuid) + return s !== null && s.total_scenes > 0 +} + function sceneVlmClass(fileUuid: string | undefined): string { const s = sceneVlmStats(fileUuid) if (!s || s.total_scenes === 0) return '' @@ -1323,7 +1328,8 @@ function sceneVlmIcon(fileUuid: string | undefined): string { function sceneVlmLabel(fileUuid: string | undefined): string { const s = sceneVlmStats(fileUuid) - if (!s || s.total_scenes === 0) return '' + if (!s) return '—' + if (s.total_scenes === 0) return '—' return `(${s.total_scenes})` } @@ -2297,6 +2303,8 @@ function resetFilters() { .ms-proc-line { display: flex; align-items: center; } .ms-face-th-input { margin-left: auto; width: 90px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text-primary); background: var(--bg-card); } .ms-proc-count { margin-left: 4px; font-size: 11px; color: var(--text-secondary); } +.ms-proc-clickable { cursor: pointer; text-decoration: underline; } +.ms-proc-clickable:hover { color: var(--primary-color); } .ms-fm-progress { position: relative; height: 20px; background: var(--border-light); border-radius: 4px; margin-top: 4px; overflow: hidden; } .ms-fm-progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-color), #4285f4); border-radius: 4px; transition: width 0.3s; } .ms-fm-progress-bar.indeterminate { width: 100%; background: linear-gradient(90deg, transparent, var(--primary-color), #4285f4, transparent); background-size: 200% 100%; animation: shimmer 1.5s infinite; }