Some checks failed
ci / ci (22, ubuntu-latest) (push) Has been cancelled
Nuxt 4 + Supabase + Flightics API. Incluye búsqueda de vuelos, inspiraciones, watchlist, tracking de precios y mapa interactivo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
809 B
Vue
47 lines
809 B
Vue
<script setup lang="ts">
|
|
const { user, logout } = useAuth()
|
|
|
|
const items = computed(() => [
|
|
[{
|
|
label: user.value?.email ?? '',
|
|
disabled: true
|
|
}],
|
|
[{
|
|
label: 'Watchlist',
|
|
icon: 'i-lucide-heart',
|
|
to: '/watchlist'
|
|
},
|
|
{
|
|
label: 'Preferencias',
|
|
icon: 'i-lucide-settings',
|
|
to: '/settings'
|
|
}],
|
|
[{
|
|
label: 'Cerrar sesion',
|
|
icon: 'i-lucide-log-out',
|
|
click: logout
|
|
}]
|
|
])
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="user">
|
|
<UDropdownMenu :items="items">
|
|
<UButton
|
|
icon="i-lucide-user"
|
|
color="neutral"
|
|
variant="ghost"
|
|
:label="user.email?.split('@')[0]"
|
|
/>
|
|
</UDropdownMenu>
|
|
</div>
|
|
<UButton
|
|
v-else
|
|
to="/auth"
|
|
label="Entrar"
|
|
icon="i-lucide-log-in"
|
|
variant="ghost"
|
|
color="neutral"
|
|
/>
|
|
</template>
|