From c3a549f46d3e4fa74c905a87ab89d9652b7c0cd7 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Tue, 21 Dec 2021 15:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8C=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=9A=E6=AC=A1=E5=8D=87=E7=BA=A7=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UpgradeDialog.vue | 29 +++++++++++++++++++++++++++-- src/i18n/zh-CN/index.ts | 2 ++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/components/UpgradeDialog.vue b/src/components/UpgradeDialog.vue index e079575..0092f6c 100644 --- a/src/components/UpgradeDialog.vue +++ b/src/components/UpgradeDialog.vue @@ -214,9 +214,34 @@ export default defineComponent({ }); } catch {} }, - onUploaded() {}, + onUploaded() { + loading.value = false; + let upgrader = + upgrade_type.value == $t.t("software") + ? uploader_software.value + : uploader_rootfs.value; + if (upgrader) { + console.log(upgrader); + upgrader.removeUploadedFiles(); + } + $q.notify({ + type: "positive", + icon: "done", + message: + $t.t("update file upload") + + $t.t("success") + + "! \n" + + $t.t( + "the system automatically restarts after the upgrade is complete" + ), + position: "top", + timeout: 1000, + }); + setTimeout(() => { + window.location.reload(); + }, 1500); + }, onFailed(info: any) { - console.log(info); $q.notify({ type: "warning", message: $t.t("update file upload") + $t.t("fail") + "!", diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index 980a507..5ef7005 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -256,4 +256,6 @@ export default { "output board setting": "输出板设置", roofs: "文件系统", "update file upload": "升级文件上传", + "the system automatically restarts after the upgrade is complete": + "系统将在升级完成后自动重启", };