fix bugs
This commit is contained in:
@@ -7,6 +7,7 @@ import { setupRouterGuards } from '@/app/setupRouter'
|
||||
import router from '@/router'
|
||||
import { applyProjectTheme } from '@/utils/config'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { getToken } from '@/utils'
|
||||
|
||||
type BootWindow = Window & {
|
||||
@@ -93,9 +94,14 @@ export async function bootstrapApp() {
|
||||
|
||||
const { app } = createVueApp()
|
||||
const settingsStore = useSettingsStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
await withTimeout(settingsStore.fetchSettings(), 45000, 'Settings loading timeout')
|
||||
|
||||
if (getToken()) {
|
||||
await withTimeout(userStore.getMyInfo(), 45000, 'User session loading timeout')
|
||||
}
|
||||
|
||||
setupRouterGuards()
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user