注释---替换视频进度

This commit is contained in:
北枳 2025-08-14 12:59:38 +08:00
parent 19ef2792f6
commit 35b696c031

View File

@ -33,32 +33,6 @@ interface Role {
tags: string[];
}
// Mock 数据
const mockReplaceVideoData = {
count: 10,
completed: 2, // 已完成个数
data: [
{
id: '1',
name: '替换视频1',
videoUrl: ['https://video-base-imf.oss-ap-southeast-7.aliyuncs.com/uploads/FJ1_76a6cd5d-e4dd-4bed-8d5f-65306f146caf-20250812112433.mp4'],
status: 1
}, {
id: '2',
name: '替换视频1',
videoUrl: [],
status: 2
},
{ id: '3', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '4', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '5', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '6', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '7', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '8', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '9', name: '替换视频1', videoUrl: [], status: 0 },
{ id: '10', name: '替换视频1', videoUrl: [], status: 0 },
]
}
interface CharacterTabContentProps {
taskSketch: any[];
@ -402,57 +376,6 @@ export function CharacterTabContent({
</motion.div>
{/* 替换视频进度 预览区域 */}
<motion.div
className="grid grid-cols-1 gap-6"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.2 }}
>
<div className="flex flex-col gap-1">
<div className="flex items-center gap-2">
<span className="text-sm text-gray-500"></span>
<span className="text-sm text-blue-500">
{mockReplaceVideoData.completed}/{mockReplaceVideoData.count}
</span>
</div>
<HorizontalScroller
itemWidth={128}
gap={0}
selectedIndex={-1}
onItemClick={() => {}}
>
{mockReplaceVideoData.data.map((shot) => (
<div key={shot.id} className="flex items-center w-[128px] h-full rounded-sm overflow-hidden">
{shot.status === 0 && (
<div className="w-full h-full flex items-center justify-center bg-black/10">
<Loader2 className="w-4 h-4 animate-spin text-blue-500" />
</div>
)}
{shot.status === 1 && (
<video
src={shot.videoUrl[0]}
className="w-full h-full object-cover"
muted
loop
playsInline
onMouseEnter={(e) => e.currentTarget.play()}
onMouseLeave={(e) => e.currentTarget.pause()}
/>
)}
{/* 任务失败 */}
{shot.status === 2 && (
<div className="w-full h-full flex items-center justify-center bg-red-500/10">
<CircleX className="w-4 h-4 text-red-500" />
</div>
)}
</div>
))}
</HorizontalScroller>
</div>
</motion.div>
<FloatingGlassPanel
open={isReplacePanelOpen}
width='66vw'