mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
✨ 检测更新,自动弹出 Changelog
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
<v-btn
|
<v-btn
|
||||||
size="small"
|
size="small"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@click="toOuter('https://github.com/BTMuli/Tauri.Genshin/releases/latest')"
|
@click="toOuter('https://github.com/BTMuli/TeyvatGuide/releases/latest')"
|
||||||
>
|
>
|
||||||
BETA
|
BETA
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { useHomeStore } from "../../store/modules/home";
|
|||||||
import { useAppStore } from "../../store/modules/app";
|
import { useAppStore } from "../../store/modules/app";
|
||||||
// utils
|
// utils
|
||||||
import { getBuildTime } from "../../utils/TGBuild";
|
import { getBuildTime } from "../../utils/TGBuild";
|
||||||
|
import showConfirm from "../../components/func/confirm";
|
||||||
|
|
||||||
// store
|
// store
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@@ -54,7 +55,6 @@ onMounted(async () => {
|
|||||||
if (!appStore.devEnv && appStore.devMode) {
|
if (!appStore.devEnv && appStore.devMode) {
|
||||||
appStore.devMode = false;
|
appStore.devMode = false;
|
||||||
}
|
}
|
||||||
appStore.buildTime = getBuildTime();
|
|
||||||
const showItems = homeStore.getShowValue();
|
const showItems = homeStore.getShowValue();
|
||||||
await Promise.allSettled(
|
await Promise.allSettled(
|
||||||
showItems.map((item) => {
|
showItems.map((item) => {
|
||||||
@@ -71,6 +71,16 @@ onMounted(async () => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
timer.value = setInterval(readLoading, 100);
|
timer.value = setInterval(readLoading, 100);
|
||||||
|
if (appStore.buildTime !== getBuildTime() && !appStore.devEnv) {
|
||||||
|
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 {
|
function setItemRef(item: any): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user