fix : corrections de tous les retours + modification de la seed et fixtures

This commit is contained in:
tristan
2026-02-16 16:26:00 +01:00
parent 08e7c1508c
commit be29daf4d1
41 changed files with 253 additions and 207 deletions
+11 -26
View File
@@ -2,7 +2,7 @@
<div class="min-h-screen text-neutral-900 flex flex-col">
<!-- HEADER -->
<header class="w-full bg-primary-500 py-5 px-6">
<div class="flex w-full items-center ">
<div class="flex w-full items-center justify-between">
<!-- Burger (mobile) -->
<button
type="button"
@@ -111,24 +111,23 @@
<div class="w-[44px] md:hidden"></div>
<!-- User dropdown à droite (desktop) -->
<div v-if="auth.isAuthenticated" class="ml-auto relative hidden md:flex items-center text-white">
<div v-if="auth.isAuthenticated" class="ml-auto relative hidden md:flex items-center text-white group">
<button
type="button"
class="inline-flex items-center text-xl leading-none transition hover:opacity-80"
@click="toggleUserMenu"
class="inline-flex items-center py-2 -my-2 text-xl leading-none transition hover:opacity-80"
aria-haspopup="true"
:aria-expanded="isUserMenuOpen ? 'true' : 'false'"
>
<span class="capitalize font-bold">{{ userDisplayName }}</span>
<span class="ml-[6px] inline-flex items-center font-bold">
<Icon v-if="isUserMenuOpen" name="mdi:chevron-up" size="20"/>
<Icon v-else name="mdi:chevron-down" size="20"/>
<span class="ml-[6px] inline-flex items-center font-bold transition-transform group-hover:rotate-180 group-focus-within:rotate-180">
<Icon name="mdi:chevron-down" size="20"/>
</span>
</button>
<div
v-if="isUserMenuOpen"
class="absolute right-0 top-full z-10 mt-2 w-56 rounded-md bg-primary-500 py-2 border-neutral-300 border shadow-lg"
class="absolute right-0 top-full z-10 w-56 rounded-md bg-primary-500 py-2 border-neutral-300 border shadow-lg
opacity-0 invisible pointer-events-none transition
group-hover:opacity-100 group-hover:visible group-hover:pointer-events-auto
group-focus-within:opacity-100 group-focus-within:visible group-focus-within:pointer-events-auto"
role="menu"
>
<button
@@ -169,9 +168,7 @@
>
<aside
v-if="isMenuOpen"
class="fixed left-0 top-0 z-50 h-full w-full bg-primary-600 px-6 pb-8 pt-6 text-white shadow-xl md:hidden"
role="dialog"
aria-modal="true"
class="fixed left-0 top-0 z-50 h-full w-full bg-primary-500 px-6 pb-8 pt-6 text-white shadow-xl md:hidden"
>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold uppercase">Menu</span>
@@ -212,11 +209,9 @@
</aside>
</transition>
</header>
<main class="mx-auto w-full max-w-[1280px] py-2 flex-1">
<main class="mx-auto w-full max-w-[1280px] mt-16">
<slot/>
</main>
<footer class="w-full mt-auto bg-primary-500 px-6 py-3">
<p class="font-bold text-white text-right">v{{ version }}</p>
</footer>
@@ -231,7 +226,6 @@ const auth = useAuthStore()
const {version} = useAppVersion()
const isMenuOpen = ref(false)
const isUserMenuOpen = ref(false)
const userDisplayName = computed(() => auth.user?.username ?? 'Utilisateur')
@@ -241,14 +235,6 @@ const closeMenu = () => {
const toggleMenu = () => {
isMenuOpen.value = !isMenuOpen.value
// évite davoir deux menus ouverts en même temps
if (isMenuOpen.value) isUserMenuOpen.value = false
}
const toggleUserMenu = () => {
isUserMenuOpen.value = !isUserMenuOpen.value
// idem
if (isUserMenuOpen.value) isMenuOpen.value = false
}
const handleLogout = async () => {
@@ -256,7 +242,6 @@ const handleLogout = async () => {
await auth.logout()
} finally {
closeMenu()
isUserMenuOpen.value = false
await navigateTo('/login')
}
}