feat: 优化应用更新检查逻辑;在生产环境中延迟检查更新并重构状态管理
This commit is contained in:
@@ -5,7 +5,7 @@ import { checkbox, close, contrastOutline, information, languageOutline, refresh
|
||||
const { t } = useI18n();
|
||||
const router = useIonRouter();
|
||||
const { cacheSize, calculateCacheSize, clearCache } = useCacheSize();
|
||||
const { isChecking, checkAndPromptUpdate } = useAppUpdate();
|
||||
const { isChecking, getCurrentVersion, checkAndPromptUpdate } = useAppUpdate();
|
||||
const { currentLanguage } = useLanguage();
|
||||
const { theme } = useTheme();
|
||||
const themeNames = {
|
||||
@@ -13,6 +13,7 @@ const themeNames = {
|
||||
dark: t("settings.themeDark"),
|
||||
auto: t("settings.themeAuto"),
|
||||
};
|
||||
const currentVersion = await getCurrentVersion();
|
||||
|
||||
function handleClearCache() {
|
||||
clearCache();
|
||||
@@ -115,6 +116,9 @@ onMounted(() => {
|
||||
{{ t("settings.checkUpdate") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="end">
|
||||
{{ currentVersion }}
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
Reference in New Issue
Block a user