From bac656d6f72ec6a5059965404f72f15098c08292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Thu, 4 Sep 2025 23:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20=E5=85=BC=E5=AE=B9=20task?= =?UTF-8?q?=5Fstatus=20=E6=9C=AA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow.tsx | 1 - components/pages/work-flow/editing-notification.tsx | 6 +++--- components/pages/work-flow/use-workflow-data.tsx | 5 +---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index 5207b86..5d1ee7e 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -56,7 +56,6 @@ const WorkFlow = React.memo(function WorkFlow() { aiEditingButtonRef.current?.handleAIEditing(); editingNotificationKey.current = `editing-${Date.now()}`; showEditingNotification({ - description: 'AI正在为您编辑视频...', // 可选 key: editingNotificationKey.current, onFail: () => { console.log('编辑失败'); diff --git a/components/pages/work-flow/editing-notification.tsx b/components/pages/work-flow/editing-notification.tsx index f5a75a7..865e650 100644 --- a/components/pages/work-flow/editing-notification.tsx +++ b/components/pages/work-flow/editing-notification.tsx @@ -53,7 +53,7 @@ interface EditingNotificationProps { export const showEditingNotification = (props: EditingNotificationProps) => { const { isCompleted = false, - description = 'Your video is being edited by AI...', + description = 'The intelligent editing platform is currently editing the videos.', key, onComplete, onFail, @@ -94,7 +94,7 @@ export const showEditingNotification = (props: EditingNotificationProps) => { const next = prev + (100 - prev) / 10; if (next >= 99.9) { setStatus('success'); - setCurrentDescription('编辑完成,已更新到页面中'); + setCurrentDescription('The editing is complete, and the updated video has been displayed on the page.'); onComplete?.(); clearInterval(timerRef.current); return 100; @@ -104,7 +104,7 @@ export const showEditingNotification = (props: EditingNotificationProps) => { } else if (elapsed >= timeLimit) { // 超时失败 setStatus('exception'); - setCurrentDescription('编辑超时,请重试'); + setCurrentDescription('The editing timed out, please try again.'); onFail?.(); clearInterval(timerRef.current); return; diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index f3fd483..8009a3a 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -160,7 +160,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = useEffect(() => { if (isShowError) { - msg.error('失败分镜过多,无法执行自动剪辑', 3000); + msg.error('Too many failed storyboards, unable to execute automatic editing.', 3000); } }, [isShowError]); @@ -315,8 +315,6 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = videoUrls = video.urls ? video.urls.filter((url: null | string) => url !== null) : []; // 适配旧数据 video_status = video.video_status === undefined ? (videoUrls.length > 0 ? 1 : 0) : video.video_status; - // 完成 还是 0 就是 生成失败 - video_status = task.task_status === 'COMPLETED' && video_status === 0 ? 2 : video_status; // 每一项 video 有多个视频 先默认取第一个 videoList.push({ urls: videoUrls, @@ -506,7 +504,6 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = videoUrls = video.urls ? video.urls.filter((url: null | string) => url !== null) : []; console.log('----------videoUrls', videoUrls); let video_status = video.video_status === undefined ? (videoUrls.length > 0 ? 1 : 0) : video.video_status; - video_status = data.video.task_status === 'COMPLETED' && video_status === 0 ? 2 : video_status; // 每一项 video 有多个视频 默认取存在的项 videoList.push({ urls: videoUrls,