- Create useAuthentik composable to read headers - Add UserAvatar component with avatar and user info - Add StatusBadges for auth/connection status - Add ActionButtons for logout and profile - Add UserMetadata component with full user details - Integrate all components in main page - Use Nuxt UI components throughout
35 lines
748 B
Vue
35 lines
748 B
Vue
<template>
|
|
<UCard class="w-full">
|
|
<div class="flex flex-wrap gap-3">
|
|
<!-- Botón de perfil -->
|
|
<UButton
|
|
color="primary"
|
|
size="lg"
|
|
@click="goToProfile"
|
|
>
|
|
<template #leading>
|
|
<UIcon name="i-heroicons-user-circle" />
|
|
</template>
|
|
Ver Perfil
|
|
</UButton>
|
|
|
|
<!-- Botón de logout -->
|
|
<UButton
|
|
color="error"
|
|
size="lg"
|
|
variant="soft"
|
|
@click="logout"
|
|
>
|
|
<template #leading>
|
|
<UIcon name="i-heroicons-arrow-right-on-rectangle" />
|
|
</template>
|
|
Cerrar Sesión
|
|
</UButton>
|
|
</div>
|
|
</UCard>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const { logout, goToProfile } = useAuthentik()
|
|
</script>
|