feat: Initial auth components
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
const { login } = useAuthConnexion();
|
||||
|
||||
const fields = [
|
||||
{
|
||||
name: "username",
|
||||
type: "text" as const,
|
||||
label: "Courriel",
|
||||
placeholder: "Entrez votre courriel",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "password",
|
||||
label: "Mot de passe",
|
||||
type: "password" as const,
|
||||
placeholder: "Entrez votre mot de passe",
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UAuthForm
|
||||
:schema="authLoginFormSchema"
|
||||
:fields="fields"
|
||||
title="Connexion"
|
||||
description="Veuillez vous identifier."
|
||||
loading-auto
|
||||
@submit="login"
|
||||
/>
|
||||
</template>
|
||||
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
const { logout } = useAuthConnexion();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full space-y-6">
|
||||
<div class="flex flex-col text-center">
|
||||
<div class="text-xl font-semibold text-pretty text-highlighted">Déconnexion</div>
|
||||
<div class="mt-1 text-base text-pretty text-muted">Veuillez confirmer la déconnexion.</div>
|
||||
</div>
|
||||
<UButton
|
||||
icon="i-lucide-log-out"
|
||||
block
|
||||
loading-auto
|
||||
to="#"
|
||||
label="Déconnexion"
|
||||
@click="logout()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<div class="w-full space-y-6">
|
||||
<div class="flex flex-col text-center">
|
||||
<div class="text-xl font-semibold text-pretty text-highlighted">Redirection en cours</div>
|
||||
<div class="mt-1 text-base text-pretty text-muted">Veuillez patienter...</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user