forked from 77media/video-flow
销毁 通知进度条
This commit is contained in:
parent
08ca156174
commit
1b0f043f12
@ -21,7 +21,13 @@ import { AIEditingIframeButton } from './work-flow/ai-editing-iframe';
|
|||||||
const WorkFlow = React.memo(function WorkFlow() {
|
const WorkFlow = React.memo(function WorkFlow() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("init-WorkFlow");
|
console.log("init-WorkFlow");
|
||||||
return () => console.log("unmount-WorkFlow");
|
return () => {
|
||||||
|
console.log("unmount-WorkFlow");
|
||||||
|
// 销毁编辑通知
|
||||||
|
if (editingNotificationKey.current) {
|
||||||
|
notification.destroy(editingNotificationKey.current);
|
||||||
|
}
|
||||||
|
};
|
||||||
}, []);
|
}, []);
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
const [isEditModalOpen, setIsEditModalOpen] = React.useState(false);
|
const [isEditModalOpen, setIsEditModalOpen] = React.useState(false);
|
||||||
@ -108,6 +114,7 @@ const WorkFlow = React.memo(function WorkFlow() {
|
|||||||
key: editingNotificationKey.current,
|
key: editingNotificationKey.current,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
console.log('编辑完成');
|
console.log('编辑完成');
|
||||||
|
localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true');
|
||||||
// 3秒后关闭通知
|
// 3秒后关闭通知
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (editingNotificationKey.current) {
|
if (editingNotificationKey.current) {
|
||||||
|
|||||||
@ -29,6 +29,8 @@ const descriptionStyle = {
|
|||||||
color: 'rgba(255, 255, 255, 0.65)',
|
color: 'rgba(255, 255, 255, 0.65)',
|
||||||
marginBottom: '12px',
|
marginBottom: '12px',
|
||||||
lineHeight: '1.5',
|
lineHeight: '1.5',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center'
|
||||||
};
|
};
|
||||||
|
|
||||||
interface EditingNotificationProps {
|
interface EditingNotificationProps {
|
||||||
|
|||||||
@ -136,7 +136,6 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
await getGenerateEditPlan({ project_id: episodeId });
|
await getGenerateEditPlan({ project_id: episodeId });
|
||||||
console.error('生成剪辑计划成功');
|
console.error('生成剪辑计划成功');
|
||||||
setIsGenerateEditPlan(true);
|
setIsGenerateEditPlan(true);
|
||||||
localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true');
|
|
||||||
isLoadedRef.current = 'true';
|
isLoadedRef.current = 'true';
|
||||||
setNeedStreamData(true);
|
setNeedStreamData(true);
|
||||||
// 触发回调,通知父组件计划生成完成
|
// 触发回调,通知父组件计划生成完成
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user