From 0acdc6d5f1a74c267b6883fcd541ae4922fa305c Mon Sep 17 00:00:00 2001 From: BTMuli Date: Wed, 5 Apr 2023 00:22:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E6=B7=BB=E5=8A=A0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BTMuli --- src/pages/Config.vue | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/pages/Config.vue b/src/pages/Config.vue index b03f57b6..28609635 100644 --- a/src/pages/Config.vue +++ b/src/pages/Config.vue @@ -39,6 +39,24 @@ {{ achievementsStore.last_version }} + 系统信息 + + + + + + + + + 设置 @@ -107,7 +125,7 @@ import { onMounted, ref } from "vue"; import TLoading from "../components/t-loading.vue"; import TConfirm from "../components/t-confirm.vue"; // tauri -import { dialog, fs, app } from "@tauri-apps/api"; +import { dialog, fs, app, os } from "@tauri-apps/api"; // store import useAppStore from "../store/modules/app"; import useHomeStore from "../store/modules/home"; @@ -126,6 +144,10 @@ const achievementsStore = useAchievementsStore(); const versionApp = ref("" as string); const versionTauri = ref("" as string); +// About OS +const osPlatform = ref("" as string); +const osVersion = ref("" as string); + // loading const loading = ref(true as boolean); @@ -146,6 +168,8 @@ const confirmShow = ref(false as boolean); onMounted(async () => { versionApp.value = await app.getVersion(); versionTauri.value = await app.getTauriVersion(); + osPlatform.value = `${await os.platform()}`; + osVersion.value = await os.version(); setTimeout(() => { loading.value = false; }, 1000);