diff --git a/components/ui/edit-modal.tsx b/components/ui/edit-modal.tsx index 7bfed3a..36b7baa 100644 --- a/components/ui/edit-modal.tsx +++ b/components/ui/edit-modal.tsx @@ -2,7 +2,7 @@ import React, { useState, useEffect, SetStateAction } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; -import { X, Image, Users, Video, Music, Settings, FileText, Maximize, Minimize } from 'lucide-react'; +import { X, Image, Users, Video, Music, Settings, FileText, Undo2, TriangleAlert } from 'lucide-react'; import { cn } from '@/public/lib/utils'; import { ScriptTabContent } from './script-tab-content'; import { SceneTabContent } from './scene-tab-content'; @@ -10,6 +10,7 @@ import { ShotTabContent } from './shot-tab-content'; import { SettingsTabContent } from './settings-tab-content'; import { CharacterTabContent } from './character-tab-content'; import { MusicTabContent } from './music-tab-content'; +import FloatingGlassPanel from './FloatingGlassPanel'; interface EditModalProps { isOpen: boolean; @@ -27,6 +28,7 @@ interface EditModalProps { setAnyAttribute: any; isPauseWorkFlow: boolean; scriptData: any[] | null; + applyScript: any; } const tabs = [ @@ -54,11 +56,13 @@ export function EditModal({ setIsPauseWorkFlow, setAnyAttribute, isPauseWorkFlow, - scriptData + scriptData, + applyScript }: EditModalProps) { const [activeTab, setActiveTab] = useState(activeEditTab); const [currentIndex, setCurrentIndex] = useState(currentSketchIndex); const [currentRoleIndex, setCurrentRoleIndex] = useState(0); + const [isRemindFallbackOpen, setIsRemindFallbackOpen] = useState(false); useEffect(() => { setCurrentIndex(currentSketchIndex); @@ -93,6 +97,18 @@ export function EditModal({ setCurrentIndex(0); } + const handleSave = () => { + console.log('handleSave'); + setIsRemindFallbackOpen(true); + } + + const handleConfirmGotoFallback = () => { + console.log('handleConfirmGotoFallback'); + } + const handleCloseRemindFallbackPanel = () => { + setIsRemindFallbackOpen(false); + } + const renderTabContent = () => { switch (activeTab) { case '0': @@ -102,6 +118,7 @@ export function EditModal({ setIsPauseWorkFlow={setIsPauseWorkFlow} setAnyAttribute={setAnyAttribute} isPauseWorkFlow={isPauseWorkFlow} + applyScript={applyScript} /> ); case '1': @@ -260,6 +277,7 @@ export function EditModal({ className="px-4 py-2 rounded-lg bg-blue-500 text-white hover:bg-blue-600 transition-colors" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} + onClick={() => {handleSave()}} > Save @@ -267,6 +285,40 @@ export function EditModal({ + + {/* 提醒用户 点击保存 工作流将回退 并重新执行工作流 */} + +
+
+ +

将重新生成视频并剪辑,是否需要继续?

+
+ +
+ + + +
+
+
)} diff --git a/components/ui/script-tab-content.tsx b/components/ui/script-tab-content.tsx index a0218b7..887c4c8 100644 --- a/components/ui/script-tab-content.tsx +++ b/components/ui/script-tab-content.tsx @@ -9,13 +9,15 @@ interface ScriptTabContentProps { setIsPauseWorkFlow: (isPauseWorkFlow: boolean) => void; setAnyAttribute: any; isPauseWorkFlow: boolean; + applyScript: any; } export function ScriptTabContent({ scriptData = [], setIsPauseWorkFlow, setAnyAttribute, - isPauseWorkFlow + isPauseWorkFlow, + applyScript }: ScriptTabContentProps) { // 如果没有数据,显示空状态 @@ -34,7 +36,14 @@ export function ScriptTabContent({ initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} > - + ); diff --git a/components/ui/shot-editor/CharacterToken.tsx b/components/ui/shot-editor/CharacterToken.tsx index b4d2f7a..e8cc087 100644 --- a/components/ui/shot-editor/CharacterToken.tsx +++ b/components/ui/shot-editor/CharacterToken.tsx @@ -157,20 +157,20 @@ export function CharacterToken(props: ReactNodeViewProps) {
handleRoleSelect({ name: '旁白', url: '' })} + ${name === 'Voiceover' ? 'bg-blue-500/20 text-blue-400' : 'hover:bg-white/5 text-gray-200'}`} + onClick={() => handleRoleSelect({ name: 'Voiceover', url: '' })} >
- {name === '旁白' && ( + {name === 'Voiceover' && (
)}
- 旁白 + Voiceover