Merge remote-tracking branch 'origin/kashkool' into kashkool
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
setFingerTimeOut,
|
||||
setHasFingerPrint
|
||||
} from '@/app/authBoot'
|
||||
import { recoverMobileViewportAfterAuth } from '@/layouts/composables/useMobileScrollReset'
|
||||
|
||||
export function setupRouterGuards() {
|
||||
const userStore = useUserStore()
|
||||
@@ -106,5 +107,12 @@ export function setupRouterGuards() {
|
||||
}
|
||||
})
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
if (document.documentElement.classList.contains('app-layout--desktop')) return
|
||||
if (from.name === 'login') {
|
||||
recoverMobileViewportAfterAuth()
|
||||
}
|
||||
})
|
||||
|
||||
watch(currentRoute, async () => (userStore.userInfo ? '' : await start()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user