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": + "系统将在升级完成后自动重启", };