forked from 77media/video-flow
继续优化
This commit is contained in:
parent
fea48b8c11
commit
6427d074b2
@ -139,8 +139,10 @@ const WorkFlow = React.memo(function WorkFlow() {
|
||||
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();
|
||||
|
||||
@ -286,7 +286,7 @@ export function H5MediaViewer({
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div data-alt="script-content" className="w-full h-full pt-[4rem]">
|
||||
<div data-alt="script-content" className="w-full h-full">
|
||||
{scriptData ? (
|
||||
<>
|
||||
<ScriptRenderer
|
||||
|
||||
@ -298,10 +298,8 @@ export function ThumbnailGrid({
|
||||
</div>
|
||||
)}
|
||||
{sketch.status === 2 && (
|
||||
<div className="absolute inset-0 bg-red-500/5 flex items-center justify-center">
|
||||
<div className="text-[#813b9dcc] text-xl font-bold flex items-center gap-2">
|
||||
<CircleAlert className="w-10 h-10" />
|
||||
</div>
|
||||
<div className="absolute inset-0 bg-red-500/5 flex items-center justify-center z-20">
|
||||
<div className="text-2xl mb-4">⚠️</div>
|
||||
</div>
|
||||
)}
|
||||
{/* 只在生成过程中或没有分镜图片时使用ProgressiveReveal */}
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user