From 05a5cce863e808fce68fba5f4d42c579cee3dbad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?=
<7854742+wang_rumeng@user.noreply.gitee.com>
Date: Wed, 16 Jul 2025 03:23:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/pages/work-flow/thumbnail-grid.tsx | 13 ++++++-------
components/pages/work-flow/use-workflow-data.tsx | 5 +++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/components/pages/work-flow/thumbnail-grid.tsx b/components/pages/work-flow/thumbnail-grid.tsx
index 5c4c948..462e81f 100644
--- a/components/pages/work-flow/thumbnail-grid.tsx
+++ b/components/pages/work-flow/thumbnail-grid.tsx
@@ -49,6 +49,7 @@ export function ThumbnailGrid({
behavior: 'smooth'
});
}
+ console.log('taskVideos', taskVideos);
}, [currentSketchIndex, taskSketch.length]);
// 处理鼠标/触摸拖动事件
@@ -170,9 +171,9 @@ export function ThumbnailGrid({
// 渲染视频阶段的缩略图
const renderVideoThumbnails = () => (
- taskSketch.map((sketch, index) => {
+ taskVideos.map((video, index) => {
const defaultBgColors = ['RGB(45, 50, 70)', 'RGB(75, 80, 100)', 'RGB(105, 110, 130)'];
- const bgColors = sketch?.bg_rgb || defaultBgColors;
+ const bgColors = defaultBgColors;
return (
@@ -236,7 +237,6 @@ export function ThumbnailGrid({
playsInline
loop
muted
- poster={sketch.url}
/>
@@ -249,7 +249,6 @@ export function ThumbnailGrid({
playsInline
loop
muted
- poster={sketch.url}
/>
)}
@@ -350,7 +349,7 @@ export function ThumbnailGrid({
onMouseUp={handleMouseUp}
onMouseLeave={() => setIsDragging(false)}
>
- {Number(currentStep) > 2 && Number(currentStep) < 6
+ {Number(currentStep) > 2 && taskVideos.length > 0 && Number(currentStep) < 6
? renderVideoThumbnails()
: renderSketchThumbnails()
}
diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx
index 4b566f1..36681f6 100644
--- a/components/pages/work-flow/use-workflow-data.tsx
+++ b/components/pages/work-flow/use-workflow-data.tsx
@@ -20,6 +20,7 @@ const LOADING_TEXT_MAP = {
sketchComplete: 'Sketch generation complete',
character: 'Drawing characters...',
newCharacter: (count: number, total: number) => `Drawing character ${count + 1 > total ? total : count + 1}/${total}...`,
+ getVideoStatus: 'Getting video status...',
video: (count: number, total: number) => `Generating video ${count + 1 > total ? total : count + 1}/${total}...`,
videoComplete: 'Video generation complete',
audio: 'Generating background audio...',
@@ -135,7 +136,7 @@ export function useWorkflowData() {
// 角色生成完成
finalStep = '3';
- loadingText = LOADING_TEXT_MAP.video(0, sketchCount);
+ loadingText = LOADING_TEXT_MAP.getVideoStatus;
}
}
if (task.task_name === 'generate_videos' && task.task_result) {
@@ -302,7 +303,7 @@ export function useWorkflowData() {
} else {
finalStep = '3';
if (!data.video || !data.video.data || !data.video.data.length) {
- loadingText = LOADING_TEXT_MAP.video(0, data.video.total_count || data.sketch.total_count);
+ loadingText = LOADING_TEXT_MAP.getVideoStatus;
}
}
}