diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index 14e9abf..5207b86 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -21,7 +21,13 @@ import { AIEditingIframeButton } from './work-flow/ai-editing-iframe'; const WorkFlow = React.memo(function WorkFlow() { useEffect(() => { console.log("init-WorkFlow"); - return () => console.log("unmount-WorkFlow"); + return () => { + console.log("unmount-WorkFlow"); + // 销毁编辑通知 + if (editingNotificationKey.current) { + notification.destroy(editingNotificationKey.current); + } + }; }, []); const containerRef = useRef(null); const [isEditModalOpen, setIsEditModalOpen] = React.useState(false); @@ -108,6 +114,7 @@ const WorkFlow = React.memo(function WorkFlow() { key: editingNotificationKey.current, onComplete: () => { console.log('编辑完成'); + localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true'); // 3秒后关闭通知 setTimeout(() => { if (editingNotificationKey.current) { diff --git a/components/pages/work-flow/editing-notification.tsx b/components/pages/work-flow/editing-notification.tsx index 5101d4d..f5a75a7 100644 --- a/components/pages/work-flow/editing-notification.tsx +++ b/components/pages/work-flow/editing-notification.tsx @@ -29,6 +29,8 @@ const descriptionStyle = { color: 'rgba(255, 255, 255, 0.65)', marginBottom: '12px', lineHeight: '1.5', + display: 'flex', + alignItems: 'center' }; interface EditingNotificationProps { diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index ca0db4f..f3fd483 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -136,7 +136,6 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = await getGenerateEditPlan({ project_id: episodeId }); console.error('生成剪辑计划成功'); setIsGenerateEditPlan(true); - localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true'); isLoadedRef.current = 'true'; setNeedStreamData(true); // 触发回调,通知父组件计划生成完成