From d07ef6f642370b9037f1c71ff255cd5131763eb2 Mon Sep 17 00:00:00 2001
From: AkiChase <1003019131@qq.com>
Date: Mon, 6 May 2024 19:43:27 +0800
Subject: [PATCH] feat(front): check update at startup
---
src/App.vue | 6 ++++
src/components/Mask.vue | 54 +++++++++++++++++++++++++++--
src/components/setting/About.vue | 55 +++---------------------------
src/components/setting/Setting.vue | 55 +++++++++++++++++-------------
src/store/global.ts | 3 ++
5 files changed, 97 insertions(+), 76 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index fa2307b..b7544e4 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -123,4 +123,10 @@ onMounted(async () => {
.n-scrollbar-content {
height: 100%;
}
+
+.n-spin-content,
+.n-spin-container {
+ width: 100%;
+ height: 100%;
+}
diff --git a/src/components/Mask.vue b/src/components/Mask.vue
index ff12a36..793cbcc 100644
--- a/src/components/Mask.vue
+++ b/src/components/Mask.vue
@@ -1,6 +1,6 @@
@@ -184,3 +233,4 @@ function toStartServer() {
}
}
+h, import { getVersion } from "@tauri-apps/api/app";
diff --git a/src/components/setting/About.vue b/src/components/setting/About.vue
index 0aa4611..430fcd7 100644
--- a/src/components/setting/About.vue
+++ b/src/components/setting/About.vue
@@ -1,22 +1,11 @@
diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue
index cfb32c3..5aa1e6a 100644
--- a/src/components/setting/Setting.vue
+++ b/src/components/setting/Setting.vue
@@ -3,33 +3,38 @@ import Basic from "./Basic.vue";
import Script from "./Script.vue";
import Mask from "./Mask.vue";
import About from "./About.vue";
-import { NTabs, NTabPane, NScrollbar } from "naive-ui";
+import { NTabs, NTabPane, NScrollbar, NSpin } from "naive-ui";
+import { useGlobalStore } from "../../store/global";
+
+const store = useGlobalStore();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -41,6 +46,10 @@ import { NTabs, NTabPane, NScrollbar } from "naive-ui";
overflow-y: auto;
display: flex;
+ .n-tabs{
+ height: 100%;
+ }
+
.n-tab-pane {
padding: 0;
}
diff --git a/src/store/global.ts b/src/store/global.ts
index f1eff76..6f39f48 100644
--- a/src/store/global.ts
+++ b/src/store/global.ts
@@ -39,6 +39,8 @@ export const useGlobalStore = defineStore("global", () => {
show: true,
});
+ let checkUpdate: () => Promise = async () => {};
+
function applyEditKeyMappingList(): boolean {
const set = new Set();
for (const keyMapping of editKeyMappingList.value) {
@@ -91,5 +93,6 @@ export const useGlobalStore = defineStore("global", () => {
applyEditKeyMappingList,
resetEditKeyMappingList,
setKeyMappingIndex,
+ checkUpdate,
};
});