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;
}
}
}