mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
修改检查更新逻辑
This commit is contained in:
@@ -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')!
|
||||
|
||||
Reference in New Issue
Block a user