mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 03:10:11 +08:00
feat: add vue-toastification for alerting
This commit is contained in:
1 parent
2d0fffc8f4
commit
d0e2a4125d
7 files changed
+58
-22
No files matched your search
+9
-1
@@ -8,7 +8,12 @@ import { isLoggedIn } from './utils/auth'
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/game',
|
||||
redirect: {
|
||||
name: 'game',
|
||||
params: {
|
||||
questId: 'helloworld',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
@@ -55,6 +60,9 @@ router.beforeEach(async (to, from, next) => {
|
||||
} else if (to.meta.requiresGuest && loggedIn) {
|
||||
next({
|
||||
name: 'game', // Or any default authenticated user route
|
||||
params: {
|
||||
questId: 'helloworld',
|
||||
},
|
||||
})
|
||||
} else {
|
||||
next() // Always call next() at the end
|
||||
|
||||
Reference in new issue
Block a user