generated from pascalmartineau/wp-skeleton
feat: Initial Nuxt app
This commit is contained in:
15
wp-content/themes/ccat/app/components/auth/LoginForm.vue
Normal file
15
wp-content/themes/ccat/app/components/auth/LoginForm.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
const { loginSchema, loginFields, onLoginSubmit } = useLogin();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UAuthForm
|
||||
:schema="loginSchema"
|
||||
:fields="loginFields"
|
||||
title="Connexion"
|
||||
description="Veuillez vous identifier."
|
||||
icon="i-lucide-user"
|
||||
loading-auto
|
||||
@submit="onLoginSubmit"
|
||||
/>
|
||||
</template>
|
||||
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
const { loggedIn } = useUserSession();
|
||||
defineProps<{ showLabels: boolean }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthState>
|
||||
<UButton
|
||||
:icon="loggedIn ? 'i-lucide-log-out' : 'i-lucide-log-in'"
|
||||
color="neutral"
|
||||
to="/auth"
|
||||
:label="showLabels ? (loggedIn ? 'Déconnexion' : 'Connexion') : undefined"
|
||||
/>
|
||||
</AuthState>
|
||||
</template>
|
||||
24
wp-content/themes/ccat/app/components/auth/LogoutForm.vue
Normal file
24
wp-content/themes/ccat/app/components/auth/LogoutForm.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
const { onLogoutClick } = useLogout();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full space-y-6">
|
||||
<div class="flex flex-col text-center">
|
||||
<div class="text-xl text-pretty font-semibold 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="/auth"
|
||||
label="Déconnexion"
|
||||
@click="onLogoutClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
12
wp-content/themes/ccat/app/components/auth/SignUpButton.vue
Normal file
12
wp-content/themes/ccat/app/components/auth/SignUpButton.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{ showLabels: boolean }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UButton
|
||||
icon="i-lucide-user"
|
||||
color="primary"
|
||||
to="#"
|
||||
:label="showLabels ? 'Devenir membre' : undefined"
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user