修复重启提示持续时间

This commit is contained in:
whyour 2023-07-18 21:39:03 +08:00
parent 4e091b0c3e
commit 01e2bd007d
3 changed files with 3 additions and 29 deletions

View File

@ -46,10 +46,7 @@ const CronLogModal = ({
const log = data as string; const log = data as string;
setValue(log || '暂无日志'); setValue(log || '暂无日志');
const hasNext = Boolean( const hasNext = Boolean(
log && log && !logEnded(log) && !log.includes('任务未运行'),
!logEnded(log) &&
!log.includes('重启面板') &&
!log.includes('任务未运行'),
); );
setExecuting(hasNext); setExecuting(hasNext);
autoScroll(); autoScroll();
@ -58,29 +55,6 @@ const CronLogModal = ({
getCronLog(); getCronLog();
}, 2000); }, 2000);
} }
if (
log &&
log.includes('重启面板') &&
cron.status === CrontabStatus.running
) {
message.warning({
content: (
<span>
<Countdown
className="inline-countdown"
format="ss"
value={Date.now() + 1000 * 30}
/>
</span>
),
duration: 10,
});
setTimeout(() => {
window.location.reload();
}, 30000);
}
} }
}) })
.finally(() => { .finally(() => {

View File

@ -143,7 +143,7 @@ const CheckUpdate = ({ socketMessage, systemInfo }: any) => {
</span> </span>
), ),
duration: 15, duration: 30,
}); });
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();

View File

@ -141,7 +141,7 @@ const Other = ({
</span> </span>
), ),
duration: 15, duration: 30,
}); });
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();