升级对话框显示服务器版本
This commit is contained in:
parent
1bfb5af0a5
commit
27f914c995
|
@ -117,7 +117,7 @@ export default defineComponent({
|
|||
console.log(e);
|
||||
}
|
||||
|
||||
EventBus.getInstance().on(EventNamesDefine.CheckDebug2, () => {
|
||||
EventBus.getInstance().on(EventNamesDefine.CheckDebug, () => {
|
||||
const to_normal_url = () => {
|
||||
const p1 = window.location.href.indexOf("?debug");
|
||||
const p2 = window.location.href.indexOf("#");
|
||||
|
|
|
@ -1090,6 +1090,7 @@ export default defineComponent({
|
|||
});
|
||||
loading.value = false;
|
||||
uploading.value = false;
|
||||
uploader.value.reset()
|
||||
}, 500);
|
||||
},
|
||||
copyFile(file: FileEntity) {
|
||||
|
|
|
@ -91,7 +91,9 @@
|
|||
|
||||
<q-separator />
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-card-actions>
|
||||
<q-item-section>V: {{ server_version }}</q-item-section>
|
||||
<q-space />
|
||||
<q-btn
|
||||
:loading="loading"
|
||||
flat
|
||||
|
@ -143,7 +145,7 @@ export default defineComponent({
|
|||
|
||||
let select_options = [$t.t("software"), $t.t("rootfs")];
|
||||
let upgrade_type = ref($t.t("software"));
|
||||
|
||||
const server_version = ref("unknow");
|
||||
return {
|
||||
show_dialog,
|
||||
loading,
|
||||
|
@ -154,19 +156,27 @@ export default defineComponent({
|
|||
file_count,
|
||||
upgrade_type,
|
||||
select_options,
|
||||
server_version,
|
||||
loga(a: any) {
|
||||
console.log(a);
|
||||
},
|
||||
showDialog() {
|
||||
show_dialog.value = true;
|
||||
|
||||
let url = GlobalData.getInstance().createCurrentRequestUrl();
|
||||
if (url) {
|
||||
if (url) {
|
||||
url.pathname = "/upload_soft_file";
|
||||
upload_url_software.value = url.toString();
|
||||
url.pathname = "/upload_root_fs_file";
|
||||
upload_url_rootfs.value = url.toString();
|
||||
}
|
||||
try {
|
||||
let client = GlobalData.getInstance().getCurrentClient();
|
||||
client?.getBuildInfo()?.then((build_info) => {
|
||||
if (build_info) {
|
||||
server_version.value = build_info.version;
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
},
|
||||
resetData() {
|
||||
loading.value = false;
|
||||
|
|
Loading…
Reference in New Issue