升级对话框显示服务器版本
This commit is contained in:
parent
8b6949f087
commit
febcf00d94
|
@ -92,7 +92,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
|
||||
|
@ -144,6 +146,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,
|
||||
|
@ -155,6 +158,7 @@ export default defineComponent({
|
|||
file_count,
|
||||
upgrade_type,
|
||||
select_options,
|
||||
server_version,
|
||||
generatorFileUploadHeaders(files: File[]) {
|
||||
if (files.length > 0) {
|
||||
return [
|
||||
|
@ -189,6 +193,14 @@ export default defineComponent({
|
|||
|
||||
url.searchParams.set("type", HttpProtocol.UploadTypeSoftware);
|
||||
upload_url_software.value = url.toString();
|
||||
try {
|
||||
client?.getBuildInfo()?.then((build_info) => {
|
||||
if (build_info) {
|
||||
server_version.value = build_info.version;
|
||||
}
|
||||
});
|
||||
// console.log(build_info);
|
||||
} catch {}
|
||||
}
|
||||
},
|
||||
resetData() {
|
||||
|
|
Loading…
Reference in New Issue