diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 5e45c806..650e996c 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -422,13 +422,13 @@ }) .then((resp) => { if (resp.status !== 200) { - location.href = './login' + location.reload(); return } }) .catch((e) => { - location.href = './login' console.error(e) + location.reload(); return }); } diff --git a/src_assets/common/assets/web/pin.html b/src_assets/common/assets/web/pin.html index ee6f0f8a..f7cfa1e7 100644 --- a/src_assets/common/assets/web/pin.html +++ b/src_assets/common/assets/web/pin.html @@ -429,7 +429,11 @@ credentials: 'include', method: "POST", body: JSON.stringify(editedClient) - }).finally(() => { + }) + .catch(err => { + alert(this.i18n.t('pin.save_client_error') + err); + }) + .finally(() => { setTimeout(() => { this.refreshClients(); }, 1000); @@ -518,6 +522,10 @@ } else { this.clients = []; } + }) + .catch(e => { + console.error(e) + location.reload(); }); }, } diff --git a/src_assets/common/assets/web/public/assets/locale/en.json b/src_assets/common/assets/web/public/assets/locale/en.json index 161ddbcf..78909296 100644 --- a/src_assets/common/assets/web/public/assets/locale/en.json +++ b/src_assets/common/assets/web/public/assets/locale/en.json @@ -429,6 +429,7 @@ "otp_pair_now": "PIN generated successfully, do you want to pair now?", "device_management": "Device Management", "device_management_desc": "Manage your paired devices.", + "save_client_error": "Error while saving client: ", "unpair_all": "Unpair All", "unpair_all_success": "All devices unpaired.", "unpair_all_error": "Error while unpairing", diff --git a/src_assets/common/assets/web/public/assets/locale/zh.json b/src_assets/common/assets/web/public/assets/locale/zh.json index a3604465..d212f14c 100644 --- a/src_assets/common/assets/web/public/assets/locale/zh.json +++ b/src_assets/common/assets/web/public/assets/locale/zh.json @@ -429,6 +429,7 @@ "otp_pair_now": "PIN 请求成功,是否一键配对?", "device_management": "设备管理", "device_management_desc": "管理已配对的设备。", + "save_client_error": "保存客户端时出错:", "unpair_all": "全部取消配对", "unpair_all_success": "全部取消配对成功!", "unpair_all_error": "取消配对时出错", diff --git a/src_assets/common/assets/web/troubleshooting.html b/src_assets/common/assets/web/troubleshooting.html index ec1d369a..df9ff124 100644 --- a/src_assets/common/assets/web/troubleshooting.html +++ b/src_assets/common/assets/web/troubleshooting.html @@ -148,7 +148,6 @@ this.refreshLogs(); }, 5000); this.refreshLogs(); - this.refreshClients(); }, beforeDestroy() { clearInterval(this.logInterval); @@ -190,14 +189,14 @@ }) .then((resp) => { if (resp.status !== 200) { - location.href = './login' + location.reload(); return } }) .catch((e) => { this.serverRestarting = false - location.href = './login' console.error(e) + location.reload(); return }); },