void;
onConfirm: (selectedShots: string[], addToLibrary: boolean) => void;
@@ -40,21 +42,24 @@ export const mockShots: Shot[] = [
];
export function ReplaceCharacterPanel({
- shots = [],
- character,
+ isLoading,
+ shots,
+ role,
showAddToLibrary = true,
onClose,
onConfirm,
}: ReplaceCharacterPanelProps) {
+
return (
);
}
\ No newline at end of file
diff --git a/components/ui/replace-panel.tsx b/components/ui/replace-panel.tsx
index ca69d2e..51033f2 100644
--- a/components/ui/replace-panel.tsx
+++ b/components/ui/replace-panel.tsx
@@ -4,6 +4,7 @@ import { Check, X, CircleAlert, ArrowLeft, ArrowRight } from 'lucide-react';
import { cn } from '@/public/lib/utils';
interface ReplacePanelProps {
+ isLoading: boolean;
title: string;
shots: any[];
item: any;
@@ -14,6 +15,7 @@ interface ReplacePanelProps {
}
export function ReplacePanel({
+ isLoading,
title,
shots,
item,
@@ -56,11 +58,11 @@ export function ReplacePanel({
}, []);
const handleShotToggle = (shotId: string) => {
- setSelectedShots(prev =>
- prev.includes(shotId)
- ? prev.filter(id => id !== shotId)
- : [...prev, shotId]
- );
+ // setSelectedShots(prev =>
+ // prev.includes(shotId)
+ // ? prev.filter(id => id !== shotId)
+ // : [...prev, shotId]
+ // );
};
const handleSelectAllShots = (checked: boolean) => {
@@ -104,6 +106,15 @@ export function ReplacePanel({
});
};
+ if (isLoading) {
+ return (
+
+ )
+ }
+
return (
{/* 标题 */}
@@ -115,7 +126,7 @@ export function ReplacePanel({
该内容出现在 {shots.length} 个分镜中,替换后将影响如下分镜
- */}
{/* 分镜展示区 */}
-
选择需要替换的分镜:
+ {/*
选择需要替换的分镜:
*/}
{shots.map((shot) => (