修复同一个文件多次升级无效的BUG
This commit is contained in:
parent
90478b7e53
commit
c3a549f46d
|
@ -214,9 +214,34 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
} catch {}
|
} 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) {
|
onFailed(info: any) {
|
||||||
console.log(info);
|
|
||||||
$q.notify({
|
$q.notify({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
message: $t.t("update file upload") + $t.t("fail") + "!",
|
message: $t.t("update file upload") + $t.t("fail") + "!",
|
||||||
|
|
|
@ -256,4 +256,6 @@ export default {
|
||||||
"output board setting": "输出板设置",
|
"output board setting": "输出板设置",
|
||||||
roofs: "文件系统",
|
roofs: "文件系统",
|
||||||
"update file upload": "升级文件上传",
|
"update file upload": "升级文件上传",
|
||||||
|
"the system automatically restarts after the upgrade is complete":
|
||||||
|
"系统将在升级完成后自动重启",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue