Merge branch 'pre' into dev

This commit is contained in:
北枳 2025-07-16 15:35:58 +08:00
commit 6ca77aff55
2 changed files with 9 additions and 9 deletions

View File

@ -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 (
<div
@ -185,9 +186,9 @@ export function ThumbnailGrid({
<div className="w-full h-full transform hover:scale-105 transition-transform duration-500">
<img
className={`w-full h-full object-cover transition-all duration-300 ${
(!taskVideos[index] && !isPlaying) ? 'filter blur-sm opacity-60' : ''
(!taskSketch[index] && !isPlaying) ? 'filter blur-sm opacity-60' : ''
}`}
src={sketch.url}
src={taskSketch[index] ? taskSketch[index].url : video.url}
alt={`Thumbnail ${index + 1}`}
/>
</div>
@ -236,7 +237,6 @@ export function ThumbnailGrid({
playsInline
loop
muted
poster={sketch.url}
/>
</div>
</ProgressiveReveal>
@ -249,7 +249,6 @@ export function ThumbnailGrid({
playsInline
loop
muted
poster={sketch.url}
/>
</div>
)}
@ -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()
}

View File

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