forked from 77media/video-flow
剪辑计划 未成功 不显示跳转剪辑平台按钮
This commit is contained in:
parent
f12505eae4
commit
eee3026699
@ -61,6 +61,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
const [isPauseWorkFlow, setIsPauseWorkFlow] = useState(false);
|
const [isPauseWorkFlow, setIsPauseWorkFlow] = useState(false);
|
||||||
const [canGoToCut, setCanGoToCut] = useState(false);
|
const [canGoToCut, setCanGoToCut] = useState(false);
|
||||||
const [isShowError, setIsShowError] = useState(false);
|
const [isShowError, setIsShowError] = useState(false);
|
||||||
|
const [isGenerateEditPlan, setIsGenerateEditPlan] = useState(false);
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
mode: 'automatic' as 'automatic' | 'manual' | 'auto',
|
mode: 'automatic' as 'automatic' | 'manual' | 'auto',
|
||||||
originalText: '',
|
originalText: '',
|
||||||
@ -134,6 +135,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
try {
|
try {
|
||||||
await getGenerateEditPlan({ project_id: episodeId });
|
await getGenerateEditPlan({ project_id: episodeId });
|
||||||
console.error('生成剪辑计划成功');
|
console.error('生成剪辑计划成功');
|
||||||
|
setIsGenerateEditPlan(true);
|
||||||
localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true');
|
localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true');
|
||||||
isLoadedRef.current = 'true';
|
isLoadedRef.current = 'true';
|
||||||
setNeedStreamData(true);
|
setNeedStreamData(true);
|
||||||
@ -142,6 +144,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('生成剪辑计划失败:', error);
|
console.error('生成剪辑计划失败:', error);
|
||||||
setNeedStreamData(true);
|
setNeedStreamData(true);
|
||||||
|
setIsGenerateEditPlan(false);
|
||||||
}
|
}
|
||||||
}, [episodeId, onEditPlanGenerated]);
|
}, [episodeId, onEditPlanGenerated]);
|
||||||
|
|
||||||
@ -645,7 +648,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
fallbackToStep,
|
fallbackToStep,
|
||||||
originalText: state.originalText,
|
originalText: state.originalText,
|
||||||
// showGotoCutButton: from && currentLoadingText.includes('Post-production') ? true : false,
|
// showGotoCutButton: from && currentLoadingText.includes('Post-production') ? true : false,
|
||||||
showGotoCutButton: canGoToCut ? true : false,
|
showGotoCutButton: canGoToCut && isGenerateEditPlan ? true : false,
|
||||||
generateEditPlan: openEditPlan,
|
generateEditPlan: openEditPlan,
|
||||||
handleRetryVideo
|
handleRetryVideo
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user