fix: the detection logic of the new version
This commit is contained in:
@@ -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