feat: update authentication flow and user navigation
This commit is contained in:
@@ -12,7 +12,7 @@ watch(() => route.path, () => {
|
||||
|
||||
const navLinks = [
|
||||
{ name: 'Home', path: '/' },
|
||||
{ name: 'Fai una segnalazione', path: '/reports/create' },
|
||||
{ name: 'Fai una segnalazione', path: '/reports/new' },
|
||||
{ name: 'Esplora i dati', path: '/open-data' },
|
||||
{ name: 'Come funziona', path: '/info' }
|
||||
]
|
||||
@@ -43,9 +43,16 @@ const { isAuthenticated, user, logout } = useAuth()
|
||||
</div>
|
||||
|
||||
<div class="header-slim-right-zone" role="navigation">
|
||||
<!-- Utente Autenticato: Bottone Utente + Bottone Esci -->
|
||||
<div v-if="isAuthenticated" class="d-flex align-items-center gap-2">
|
||||
<NuxtLink class="btn btn-primary btn-icon btn-full" to="/me"
|
||||
<NuxtLink class="btn btn-primary btn-icon btn-full" to="/dashboard"
|
||||
data-element="personal-area-dashboard" data-focus-mouse="false">
|
||||
<span class="rounded-icon" aria-hidden="true">
|
||||
<BIIcon name="it-list" color="black" />
|
||||
</span>
|
||||
<span class="d-none d-lg-block">Dashboard</span>
|
||||
</NuxtLink>
|
||||
|
||||
<NuxtLink class="btn btn-primary btn-icon btn-full" to="/profile"
|
||||
data-element="personal-area-dashboard" data-focus-mouse="false">
|
||||
<span class="rounded-icon" aria-hidden="true">
|
||||
<BIIcon name="it-user" color="black" />
|
||||
@@ -62,7 +69,6 @@ const { isAuthenticated, user, logout } = useAuth()
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Utente NON Autenticato: Bottone Login -->
|
||||
<NuxtLink v-else class="btn btn-primary btn-icon btn-full" to="/auth/login"
|
||||
data-element="personal-area-login" data-focus-mouse="false">
|
||||
<span class="rounded-icon" aria-hidden="true">
|
||||
|
||||
Reference in New Issue
Block a user