修改检查更新逻辑

This commit is contained in:
whyour
2022-09-24 14:20:35 +08:00
parent 44e2caedfc
commit cb870fad85
4 changed files with 23 additions and 10 deletions
+9
View File
@@ -137,7 +137,12 @@ const CheckUpdate = ({ socketMessage }: any) => {
}
const newMessage = `${value}${_message}`;
const updateFailed = newMessage.includes('失败,请检查');
modalRef.current.update({
maskClosable: updateFailed,
closable: updateFailed,
okButtonProps: { disabled: !updateFailed },
content: (
<div style={{ height: '60vh', overflowY: 'auto' }}>
<pre
@@ -156,6 +161,10 @@ const CheckUpdate = ({ socketMessage }: any) => {
});
setValue(newMessage);
if (updateFailed) {
message.error('更新失败,请检查网络及日志或稍后再试');
}
document.getElementById('log-identifier') &&
document
.getElementById('log-identifier')!