修复日志中多语言文本判断

This commit is contained in:
whyour
2023-08-21 22:50:57 +08:00
parent 4f7649f157
commit cce83f7a4c
3 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -177,7 +177,7 @@ const CheckUpdate = ({ socketMessage, systemInfo }: any) => {
}
const newMessage = `${value}${_message}`;
const updateFailed = newMessage.includes(intl.get('失败'));
const updateFailed = newMessage.includes('失败');
modalRef.current.update({
maskClosable: updateFailed,
@@ -198,7 +198,7 @@ const CheckUpdate = ({ socketMessage, systemInfo }: any) => {
),
});
if (updateFailed && !value.includes(intl.get('失败,请检查'))) {
if (updateFailed && !value.includes('失败,请检查')) {
message.error(intl.get('更新失败,请检查网络及日志或稍后再试'));
}
@@ -209,7 +209,7 @@ const CheckUpdate = ({ socketMessage, systemInfo }: any) => {
.getElementById('log-identifier')!
.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
if (_message.includes(intl.get('更新包下载成功'))) {
if (_message.includes('更新包下载成功')) {
setTimeout(() => {
showReloadModal();
}, 1000);