forked from 77media/video-flow
调整工作流loading
This commit is contained in:
parent
f8722ba8ed
commit
7ab05c26b1
@ -26,21 +26,6 @@ interface TaskInfoProps {
|
|||||||
roles: any[];
|
roles: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据加载文本返回对应的图标
|
|
||||||
const getStageIcon = (currentStage: number) => {
|
|
||||||
if (currentStage === 0) {
|
|
||||||
return Heart;
|
|
||||||
} else if (currentStage === 1) {
|
|
||||||
return Camera;
|
|
||||||
} else if (currentStage === 2) {
|
|
||||||
return Film;
|
|
||||||
} else if (currentStage === 3) {
|
|
||||||
return Scissors;
|
|
||||||
} else {
|
|
||||||
return Loader2;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const stageIconMap = {
|
const stageIconMap = {
|
||||||
0: {
|
0: {
|
||||||
icon: Heart,
|
icon: Heart,
|
||||||
@ -72,11 +57,12 @@ const StageIcons = ({ currentStage, isExpanded }: { currentStage: number, isExpa
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 将当前阶段移到第一位
|
// 将当前阶段移到第一位
|
||||||
return stages.sort((a, b) => {
|
// return stages.sort((a, b) => {
|
||||||
if (a.stage === currentStage) return -1;
|
// if (a.stage === currentStage) return -1;
|
||||||
if (b.stage === currentStage) return 1;
|
// if (b.stage === currentStage) return 1;
|
||||||
return a.stage - b.stage;
|
// return a.stage - b.stage;
|
||||||
});
|
// });
|
||||||
|
return stages;
|
||||||
}, [currentStage]);
|
}, [currentStage]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -228,21 +214,21 @@ export function TaskInfo({
|
|||||||
setIsScriptModalOpen(true);
|
setIsScriptModalOpen(true);
|
||||||
setCurrentStage(1);
|
setCurrentStage(1);
|
||||||
}
|
}
|
||||||
// if (currentLoadingText.includes('character')) {
|
if (currentLoadingText.includes('character')) {
|
||||||
// console.log('isScriptModalOpen-character', currentLoadingText, isScriptModalOpen);
|
console.log('isScriptModalOpen-character', currentLoadingText, isScriptModalOpen);
|
||||||
// if (isScriptModalOpen) {
|
if (isScriptModalOpen) {
|
||||||
// setIsScriptModalOpen(false);
|
setIsScriptModalOpen(false);
|
||||||
|
|
||||||
// // 延迟8s 再次打开
|
// 延迟8s 再次打开
|
||||||
// timerRef.current = setTimeout(() => {
|
timerRef.current = setTimeout(() => {
|
||||||
// setIsScriptModalOpen(true);
|
setIsScriptModalOpen(true);
|
||||||
// setCurrentStage(0);
|
setCurrentStage(0);
|
||||||
// }, 8000);
|
}, 8000);
|
||||||
// } else {
|
} else {
|
||||||
// setIsScriptModalOpen(true);
|
setIsScriptModalOpen(true);
|
||||||
// setCurrentStage(0);
|
setCurrentStage(0);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
if (currentLoadingText.includes('initializing')) {
|
if (currentLoadingText.includes('initializing')) {
|
||||||
console.log('isScriptModalOpen-initializing', currentLoadingText, isScriptModalOpen);
|
console.log('isScriptModalOpen-initializing', currentLoadingText, isScriptModalOpen);
|
||||||
setIsScriptModalOpen(true);
|
setIsScriptModalOpen(true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user