mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
♻️ 将更新检测上移到 app 层 #45
This commit is contained in:
@@ -8,15 +8,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { markRaw, onMounted, onUnmounted, onUpdated, ref } from "vue";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import TCalendar from "../../components/home/t-calendar.vue";
|
||||
import TPool from "../../components/home/t-pool.vue";
|
||||
import TPosition from "../../components/home/t-position.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import { getBuildTime } from "../../utils/TGBuild";
|
||||
|
||||
// store
|
||||
const appStore = useAppStore();
|
||||
@@ -69,17 +66,6 @@ onMounted(async () => {
|
||||
}),
|
||||
);
|
||||
timer.value = setInterval(readLoading, 100);
|
||||
const needUpdate = await TGSqlite.checkUpdate();
|
||||
if (needUpdate && isProdEnv) {
|
||||
const confirm = await showConfirm({
|
||||
title: "检测到版本更新",
|
||||
text: "请到设置页手动更新版本,即将弹出更新说明子页面",
|
||||
});
|
||||
if (confirm) {
|
||||
appStore.buildTime = getBuildTime();
|
||||
}
|
||||
window.open("https://app.btmuli.ink/docs/Changelogs.html");
|
||||
}
|
||||
});
|
||||
|
||||
function setItemRef(item: any): void {
|
||||
|
||||
Reference in New Issue
Block a user