剪辑计划 未成功 不显示跳转剪辑平台按钮

This commit is contained in:
北枳 2025-09-04 21:42:04 +08:00
parent f12505eae4
commit eee3026699

View File

@ -61,6 +61,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
const [isPauseWorkFlow, setIsPauseWorkFlow] = useState(false);
const [canGoToCut, setCanGoToCut] = useState(false);
const [isShowError, setIsShowError] = useState(false);
const [isGenerateEditPlan, setIsGenerateEditPlan] = useState(false);
const [state, setState] = useState({
mode: 'automatic' as 'automatic' | 'manual' | 'auto',
originalText: '',
@ -134,6 +135,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
try {
await getGenerateEditPlan({ project_id: episodeId });
console.error('生成剪辑计划成功');
setIsGenerateEditPlan(true);
localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true');
isLoadedRef.current = 'true';
setNeedStreamData(true);
@ -142,6 +144,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
} catch (error) {
console.error('生成剪辑计划失败:', error);
setNeedStreamData(true);
setIsGenerateEditPlan(false);
}
}, [episodeId, onEditPlanGenerated]);
@ -645,7 +648,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
fallbackToStep,
originalText: state.originalText,
// showGotoCutButton: from && currentLoadingText.includes('Post-production') ? true : false,
showGotoCutButton: canGoToCut ? true : false,
showGotoCutButton: canGoToCut && isGenerateEditPlan ? true : false,
generateEditPlan: openEditPlan,
handleRetryVideo
};