From 6427d074b260294cfafdb82ed85f521c634d33d2 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, 25 Sep 2025 19:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow.tsx | 4 +++- components/pages/work-flow/H5MediaViewer.tsx | 2 +- components/pages/work-flow/thumbnail-grid.tsx | 6 ++---- components/pages/work-flow/use-workflow-data.tsx | 9 ++++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index cecf083..17056f7 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -138,9 +138,11 @@ const WorkFlow = React.memo(function WorkFlow() { setTimeout(() => { handleTestExportRef.current?.(); }, 0); + + const title = isMobile ? 'editing...' : 'Performing intelligent editing...'; // 显示进度提示并启动超时定时器 - emitToastShow({ title: 'Performing intelligent editing...', progress: 0 }); + emitToastShow({ title: title, progress: 0 }); // 启动自动推进到 90% 的进度(8分钟) if (editingProgressIntervalRef.current) clearInterval(editingProgressIntervalRef.current); editingProgressStartRef.current = Date.now(); diff --git a/components/pages/work-flow/H5MediaViewer.tsx b/components/pages/work-flow/H5MediaViewer.tsx index 8a4940f..6328577 100644 --- a/components/pages/work-flow/H5MediaViewer.tsx +++ b/components/pages/work-flow/H5MediaViewer.tsx @@ -286,7 +286,7 @@ export function H5MediaViewer({ } }; return ( -
+
{scriptData ? ( <> )} {sketch.status === 2 && ( -
-
- -
+
+
⚠️
)} {/* 只在生成过程中或没有分镜图片时使用ProgressiveReveal */} diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index 51bfba6..cdb3d29 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -7,6 +7,7 @@ import { useScriptService } from "@/app/service/Interaction/ScriptService"; import { useUpdateEffect } from '@/app/hooks/useUpdateEffect'; import { LOADING_TEXT_MAP, TaskObject, Status, Stage } from '@/api/DTO/movieEdit'; import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'; +import { useDeviceType } from '@/hooks/useDeviceType'; interface UseWorkflowDataProps { onEditPlanGenerated?: () => void; @@ -37,6 +38,8 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa } }; + const { isMobile, isTablet, isDesktop } = useDeviceType(); + const cutUrl = process.env.NEXT_PUBLIC_CUT_URL_TO || 'https://smartcut.api.movieflow.ai'; console.log('cutUrl', cutUrl); @@ -158,7 +161,7 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa return; } // 显示生成剪辑计划进度提示 - emitToastShow({ title: `Generating intelligent editing plan... ${retryCount ? 'Retry Time: ' + retryCount : ''}`, progress: 0 }); + emitToastShow({ title: isMobile ? 'Preparing for editing...' : `Generating intelligent editing plan... ${retryCount ? 'Retry Time: ' + retryCount : ''}`, progress: 0 }); // 平滑推进到 80%,后续阶段接管 const start = Date.now(); const duration = 3 * 60 * 1000; // 3分钟推进到 80% @@ -198,7 +201,7 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa setIsGenerateEditPlan(false); // 显示失败提示,并在稍后隐藏 - emitToastShow({ title: 'Editing plan generation failed. Retrying later.', progress: 0 }); + // emitToastShow({ title: isMobile ? 'Editing plan generation failed. Retrying later.' : 'Editing plan generation failed. Retrying later.', progress: 0 }); setTimeout(() => { emitToastHide(); setIsLoadingGenerateEditPlan(false); @@ -419,7 +422,7 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa if (analyze_video_total_count > 0 && !isAnalyzing && analyze_video_completed_count !== analyze_video_total_count) { setIsAnalyzing(true); // 显示准备剪辑计划的提示 - emitToastShow({ title: 'Preparing intelligent editing plan...', progress: 0 }); + emitToastShow({ title: isMobile ? 'Preparing for editing...' : 'Preparing intelligent editing plan...', progress: 0 }); } if (analyze_video_total_count && analyze_video_completed_count === analyze_video_total_count) {