fix: the detection logic of the new version
This commit is contained in:
4
components.d.ts
vendored
4
components.d.ts
vendored
@@ -29,6 +29,7 @@ declare module 'vue' {
|
||||
IconFluentArrowMove20Regular: typeof import('~icons/fluent/arrow-move20-regular')['default']
|
||||
IconFluentArrowRight16Regular: typeof import('~icons/fluent/arrow-right16-regular')['default']
|
||||
IconFluentArrowSort20Regular: typeof import('~icons/fluent/arrow-sort20-regular')['default']
|
||||
IconFluentArrowUpload20Regular: typeof import('~icons/fluent/arrow-upload20-regular')['default']
|
||||
IconFluentBookLetter20Regular: typeof import('~icons/fluent/book-letter20-regular')['default']
|
||||
IconFluentCheckmark20Regular: typeof import('~icons/fluent/checkmark20-regular')['default']
|
||||
IconFluentCheckmarkCircle16Filled: typeof import('~icons/fluent/checkmark-circle16-filled')['default']
|
||||
@@ -46,6 +47,7 @@ declare module 'vue' {
|
||||
IconFluentEyeOff16Regular: typeof import('~icons/fluent/eye-off16-regular')['default']
|
||||
IconFluentHome20Regular: typeof import('~icons/fluent/home20-regular')['default']
|
||||
IconFluentKeyboardLayoutFloat20Regular: typeof import('~icons/fluent/keyboard-layout-float20-regular')['default']
|
||||
IconFluentMailEdit20Regular: typeof import('~icons/fluent/mail-edit20-regular')['default']
|
||||
IconFluentMyLocation20Regular: typeof import('~icons/fluent/my-location20-regular')['default']
|
||||
IconFluentPaddingLeft20Regular: typeof import('~icons/fluent/padding-left20-regular')['default']
|
||||
IconFluentPerson20Regular: typeof import('~icons/fluent/person20-regular')['default']
|
||||
@@ -72,7 +74,9 @@ declare module 'vue' {
|
||||
IconFluentWeatherSunny16Regular: typeof import('~icons/fluent/weather-sunny16-regular')['default']
|
||||
IconIconParkOutlineAddMusic: typeof import('~icons/icon-park-outline/add-music')['default']
|
||||
IconMaterialSymbolsMail: typeof import('~icons/material-symbols/mail')['default']
|
||||
IconOuiExport: typeof import('~icons/oui/export')['default']
|
||||
IconPhExportLight: typeof import('~icons/ph/export-light')['default']
|
||||
IconQlementineIconsExport24: typeof import('~icons/qlementine-icons/export24')['default']
|
||||
IconRiTwitterFill: typeof import('~icons/ri/twitter-fill')['default']
|
||||
IconSimpleIconsGithub: typeof import('~icons/simple-icons/github')['default']
|
||||
IconSimpleIconsWechat: typeof import('~icons/simple-icons/wechat')['default']
|
||||
|
||||
@@ -58,9 +58,11 @@ async function init() {
|
||||
store.load = true
|
||||
setTheme(settingStore.theme)
|
||||
|
||||
get(APP_VERSION.key).then(r => {
|
||||
runtimeStore.isNew = r ? (APP_VERSION.version > Number(r)) : true
|
||||
})
|
||||
if (!settingStore.first) {
|
||||
get(APP_VERSION.key).then(r => {
|
||||
runtimeStore.isNew = r ? (APP_VERSION.version > Number(r)) : true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(init)
|
||||
|
||||
@@ -443,5 +443,5 @@ a {
|
||||
}
|
||||
|
||||
.red-point {
|
||||
@apply bg-red w-3 h-3 rounded-full absolute right-5;
|
||||
@apply bg-red w-3 h-3 rounded-full absolute right-3;
|
||||
}
|
||||
@@ -40,7 +40,7 @@ const {toggleTheme} = useTheme()
|
||||
<div class="row" @click="router.push('/setting')">
|
||||
<IconFluentSettings20Regular/>
|
||||
<span v-if="settingStore.sideExpand">设置</span>
|
||||
<div class="red-point" v-if="runtimeStore.isNew"></div>
|
||||
<div class="red-point" :class="!settingStore.sideExpand && 'top-1 right-0'" v-if="runtimeStore.isNew"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom flex justify-evenly ">
|
||||
@@ -100,7 +100,7 @@ const {toggleTheme} = useTheme()
|
||||
|
||||
svg {
|
||||
flex-shrink: 0;
|
||||
font-size: 1.5rem !important;
|
||||
font-size: 1.3rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@ export const useSettingStore = defineStore('setting', {
|
||||
}
|
||||
let data = checkAndUpgradeSaveSetting(configStr)
|
||||
this.setState({...data, load: true})
|
||||
// this.load = true
|
||||
resolve(true)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user