fix(frontend): harden auth routing and callback error handling
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="min-h-screen bg-gray-50">
|
||||
<nav v-if="!isLoginPage" class="bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between shadow-sm">
|
||||
<nav v-if="showNav" class="bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between shadow-sm">
|
||||
<div class="flex items-center gap-6">
|
||||
<span class="font-bold text-gray-800 text-base">member.ose.tw</span>
|
||||
<router-link
|
||||
@@ -56,7 +56,10 @@ const route = useRoute()
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const isLoginPage = computed(() => route.name === 'login')
|
||||
const showNav = computed(() => {
|
||||
const onAuthPage = route.name === 'login' || route.name === 'auth-callback'
|
||||
return authStore.isLoggedIn && !onAuthPage
|
||||
})
|
||||
|
||||
function handleAdminNav(command) {
|
||||
const routes = {
|
||||
|
||||
Reference in New Issue
Block a user