fix: keep the interface visible while fonts load
Render fallback fonts immediately and preload regular Maple in the background. Cache public fonts after use without eagerly downloading every font during PWA installation.
This commit is contained in:
1 parent
716b495440
commit
6cbd604a28
16 files changed
+344
-308
No files matched your search
+1
-2
@@ -13,7 +13,6 @@ import '@@/assets/styles/app.css'
|
||||
import '@@/assets/styles/element-plus.scss'
|
||||
import 'virtual:uno.css'
|
||||
|
||||
watchFontLoading()
|
||||
const app = createApp(App)
|
||||
app.use(i18n).use(pinia).use(router)
|
||||
const user = useUserStore(pinia)
|
||||
@@ -28,5 +27,5 @@ watch(() => user.sessionVersion, () => {
|
||||
})
|
||||
// Mount a retryable error interface even if identity restoration temporarily fails.
|
||||
void router.isReady().catch(() => {}).finally(() => {
|
||||
app.mount('#app'); void registerPwa()
|
||||
app.mount('#app'); watchFontLoading(); void registerPwa()
|
||||
})
|
||||
Reference in new issue
Block a user