video-flow-b/components/ui/replace-character-panel.tsx
2025-08-13 23:11:12 +08:00

65 lines
1.5 KiB
TypeScript

import { ReplacePanel } from './replace-panel';
import { Shot, Character } from '@/app/model/types';
import { useEffect, useState } from 'react';
interface ReplaceCharacterPanelProps {
isLoading: boolean;
shots: any[];
role: any;
showAddToLibrary?: boolean;
onClose: () => void;
onConfirm: (selectedShots: string[], addToLibrary: boolean) => void;
}
// Mock数据
export const mockShots: Shot[] = [
{
id: '1',
thumbnailUrl: '/assets/3dr_chihiro.png',
videoUrl: 'https://video-base-imf.oss-ap-southeast-7.aliyuncs.com/uploads/FJ1-0-20250725023719.mp4',
isGenerating: false,
isSelected: true,
},
{
id: '2',
thumbnailUrl: '/assets/3dr_mono.png',
isGenerating: true,
isSelected: true,
},
{
id: '3',
thumbnailUrl: '/assets/3dr_howlcastle.png',
videoUrl: 'https://video-base-imf.oss-ap-southeast-7.aliyuncs.com/uploads/FJ3-0-20250725023725.mp4',
isGenerating: false,
isSelected: true,
},
{
id: '4',
thumbnailUrl: '/assets/3dr_spirited.jpg',
isGenerating: true,
isSelected: true,
},
];
export function ReplaceCharacterPanel({
isLoading,
shots,
role,
showAddToLibrary = true,
onClose,
onConfirm,
}: ReplaceCharacterPanelProps) {
return (
<ReplacePanel
title="Replace the new role"
shots={shots}
item={role}
showAddToLibrary={showAddToLibrary}
addToLibraryText="Add new role to library"
onClose={onClose}
onConfirm={onConfirm}
isLoading={isLoading}
/>
);
}