Ajout de l'assistant d'installation web et corrections de navigation

- Wizard d'installation en 5 étapes (/setup) : prérequis PHP, base de données
  (PostgreSQL/MySQL avec test de connexion AJAX), paramètres app, compte admin,
  résultat — génère le .env, migre et crée l'administrateur
- CheckInstallation middleware : redirige vers /setup si non installé,
  protège /setup si déjà installé ; storage/installed comme marqueur
- Menu Administration : remplacé par le composant x-dropdown Breeze (même
  positionnement que le menu utilisateur — corrige le débordement en haut)
- Logo navbar : adaptatif via h-full/py-1.5 (s'adapte à la hauteur de la barre)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 18:39:55 +02:00
parent 236d37976c
commit caf7ad7fe2
12 changed files with 906 additions and 42 deletions
+53 -42
View File
@@ -3,11 +3,12 @@
<div class="flex justify-between h-16">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('dashboard') }}" class="flex items-center">
<div class="shrink-0 flex items-center py-1.5">
<a href="{{ route('dashboard') }}" class="flex items-center h-full">
@if($siteLogoUrl)
{{-- Le logo s'adapte à la hauteur de la barre de navigation --}}
<img src="{{ $siteLogoUrl }}" alt="{{ config('app.name') }}"
class="h-8 w-auto object-contain max-w-[160px]">
class="h-full w-auto object-contain max-w-[200px]">
@else
<span class="font-semibold text-gray-800 text-lg">{{ config('app.name') }}</span>
@endif
@@ -33,42 +34,49 @@
</x-nav-link>
@if(auth()->user()->isSectionManager())
<!-- Menu Administration -->
<div class="relative hidden sm:flex sm:items-center" x-data="{ adminOpen: false }">
<button @click="adminOpen = !adminOpen"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium leading-5 transition duration-150 ease-in-out
{{ request()->routeIs('admin.*') ? 'border-indigo-400 text-gray-900' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
Administration
<svg class="ms-1 h-4 w-4 fill-current" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<!-- Menu Administration utilise le composant x-dropdown (même positionnement que le menu utilisateur) -->
<div class="hidden sm:flex sm:items-center">
<x-dropdown align="left" width="w-56">
<x-slot name="trigger">
<button class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium leading-5 transition duration-150 ease-in-out
{{ request()->routeIs('admin.*') ? 'border-indigo-400 text-gray-900' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
Administration
<svg class="ms-1 h-4 w-4 fill-current" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
</svg>
</button>
</x-slot>
<div x-show="adminOpen" @click.outside="adminOpen = false" x-cloak
class="absolute top-full left-0 mt-1 w-56 bg-white rounded-md shadow-lg border border-gray-100 z-50">
@if(auth()->user()->isAdmin())
<a href="{{ route('admin.dashboard') }}"
class="block px-4 py-2 text-sm font-medium text-indigo-700 hover:bg-indigo-50 border-b border-gray-100">
Tableau de bord admin
</a>
<a href="{{ route('admin.utilisateurs.index') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Utilisateurs</a>
@endif
<a href="{{ route('admin.sections.index') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Sections</a>
@if(auth()->user()->isAdmin())
<a href="{{ route('admin.depots.index') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Dépôts d'archives</a>
<a href="{{ route('admin.source-types.index') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Types de sources</a>
<a href="{{ route('admin.lieu-types.index') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Types de lieux</a>
<div class="border-t border-gray-100 mt-1 pt-1">
<a href="{{ route('admin.parametres') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">Paramètres du site</a>
</div>
@endif
</div>
<x-slot name="content">
@if(auth()->user()->isAdmin())
<x-dropdown-link :href="route('admin.dashboard')"
class="{{ request()->routeIs('admin.dashboard') ? 'font-semibold text-indigo-700 bg-indigo-50' : '' }}">
Tableau de bord admin
</x-dropdown-link>
<x-dropdown-link :href="route('admin.utilisateurs.index')">
Utilisateurs
</x-dropdown-link>
@endif
<x-dropdown-link :href="route('admin.sections.index')">
Sections
</x-dropdown-link>
@if(auth()->user()->isAdmin())
<x-dropdown-link :href="route('admin.depots.index')">
Dépôts d'archives
</x-dropdown-link>
<x-dropdown-link :href="route('admin.source-types.index')">
Types de sources
</x-dropdown-link>
<x-dropdown-link :href="route('admin.lieu-types.index')">
Types de lieux
</x-dropdown-link>
<div class="border-t border-gray-100 my-1"></div>
<x-dropdown-link :href="route('admin.parametres')">
Paramètres du site
</x-dropdown-link>
@endif
</x-slot>
</x-dropdown>
</div>
@endif
</div>
@@ -92,7 +100,7 @@
</a>
</div>
<!-- Settings Dropdown -->
<!-- Menu utilisateur (Profil / Déconnexion) -->
<div class="hidden sm:flex sm:items-center sm:ms-2">
<x-dropdown align="right" width="48">
<x-slot name="trigger">
@@ -124,7 +132,7 @@
</x-dropdown>
</div>
<!-- Hamburger -->
<!-- Hamburger (mobile) -->
<div class="-me-2 flex items-center sm:hidden">
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none transition duration-150 ease-in-out">
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
@@ -136,7 +144,7 @@
</div>
</div>
<!-- Responsive Navigation Menu -->
<!-- Menu responsive (mobile) -->
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
<div class="pt-2 pb-3 space-y-1">
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
@@ -173,11 +181,14 @@
<x-responsive-nav-link :href="route('admin.lieu-types.index')" :active="request()->routeIs('admin.lieu-types.*')">
Types de lieux
</x-responsive-nav-link>
<x-responsive-nav-link :href="route('admin.parametres')">
Paramètres du site
</x-responsive-nav-link>
@endif
@endif
</div>
<!-- Responsive Settings Options -->
<!-- Options utilisateur (mobile) -->
<div class="pt-4 pb-1 border-t border-gray-200">
<div class="px-4">
<div class="font-medium text-base text-gray-800">{{ Auth::user()->name }}</div>