video-flow-b/components/ui/replace-character-panel.tsx

60 lines
1.4 KiB
TypeScript

import { ReplacePanel } from './replace-panel';
import { Shot, Character } from '@/app/model/types';
interface ReplaceCharacterPanelProps {
shots: any[];
character: Character;
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({
shots = [],
character,
showAddToLibrary = true,
onClose,
onConfirm,
}: ReplaceCharacterPanelProps) {
return (
<ReplacePanel
title="替换新形象"
shots={shots}
item={character}
showAddToLibrary={showAddToLibrary}
addToLibraryText="新形象同步添加至角色库"
onClose={onClose}
onConfirm={onConfirm}
/>
);
}