Make 'Iniciar Sesión' button always visible alongside other buttons
Change button layout to show all 4 buttons at the same time: - Estado de Sesión (info/blue) - Ver Perfil (primary/blue) - Cerrar Sesión (error/red) - Iniciar Sesión (success/green) - NEW: always visible This allows users to force a re-authentication by clicking 'Iniciar Sesión' even when already authenticated, triggering Authentik login flow.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<UCard class="w-full">
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<!-- Botón de estado de sesión (siempre visible) -->
|
||||
<!-- Botón de estado de sesión -->
|
||||
<UButton
|
||||
color="info"
|
||||
size="lg"
|
||||
@@ -14,47 +14,42 @@
|
||||
Estado de Sesión
|
||||
</UButton>
|
||||
|
||||
<!-- Botones cuando HAY sesión -->
|
||||
<template v-if="isAuthenticated">
|
||||
<!-- 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 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>
|
||||
</template>
|
||||
<!-- 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>
|
||||
|
||||
<!-- Botón cuando NO hay sesión -->
|
||||
<template v-else>
|
||||
<UButton
|
||||
color="primary"
|
||||
size="lg"
|
||||
@click="reloadPage"
|
||||
>
|
||||
<template #leading>
|
||||
<UIcon name="i-heroicons-arrow-right-end-on-rectangle" />
|
||||
</template>
|
||||
Iniciar Sesión
|
||||
</UButton>
|
||||
</template>
|
||||
<!-- Botón de iniciar sesión (siempre visible) -->
|
||||
<UButton
|
||||
color="success"
|
||||
size="lg"
|
||||
@click="reloadPage"
|
||||
>
|
||||
<template #leading>
|
||||
<UIcon name="i-heroicons-arrow-right-end-on-rectangle" />
|
||||
</template>
|
||||
Iniciar Sesión
|
||||
</UButton>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user