Mode sombre, option désactivation mises à jour, user-picker avec recherche

- Dark mode complet : darkMode:'class' Tailwind, sélecteur clair/sombre/auto
  dans la navigation (mémorisé dans localStorage, sans flash au chargement) ;
  53 vues et 8 composants Breeze mis à jour avec classes dark:
- Composant user-picker : fenêtre modale avec recherche temps réel (nom/email)
  remplace les <select> d'ajout de membres dans sections et sources
- Paramètres : option "Désactiver la vérification automatique des mises à jour"
  (case à cochage auto-soumise, route POST parametres/updates)
- Panneau "Paramètres généraux" remonté en tête de la page de paramètres
- README recentré sur l'installation manuelle hébergement PHP+MySQL
- VERSION 1.0.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 19:46:22 +02:00
parent 07ab2a7063
commit f530f55577
73 changed files with 1288 additions and 913 deletions
+34 -34
View File
@@ -1,19 +1,19 @@
<x-app-layout>
<x-slot name="header">
<h2 class="text-xl font-semibold text-gray-800">Recherche dans les relevés</h2>
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Recherche dans les relevés</h2>
</x-slot>
<div class="py-8 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
{{-- Formulaire de recherche --}}
<div class="bg-white shadow rounded-lg p-6">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
<form method="GET" action="{{ route('recherche') }}" class="space-y-4">
{{-- Barre principale --}}
<div class="flex gap-3">
<div class="flex-1 relative">
<div class="absolute inset-y-0 left-3 flex items-center pointer-events-none">
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg class="w-5 h-5 text-gray-400 dark:text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"/>
</svg>
@@ -21,7 +21,7 @@
<input type="text" name="q" value="{{ request('q') }}"
placeholder="Nom, prénom, lieu, note…"
autofocus
class="block w-full pl-10 pr-4 py-2.5 border border-gray-300 rounded-md shadow-sm
class="block w-full pl-10 pr-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm
text-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<button type="submit"
@@ -30,7 +30,7 @@
</button>
@if(request()->anyFilled(['q', 'source_type_id', 'annee_debut', 'annee_fin']))
<a href="{{ route('recherche') }}"
class="px-4 py-2.5 border border-gray-300 text-gray-600 text-sm rounded-md hover:bg-gray-50">
class="px-4 py-2.5 border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 text-sm rounded-md hover:bg-gray-50 dark:hover:bg-gray-700">
Effacer
</a>
@endif
@@ -45,7 +45,7 @@
class="text-sm text-indigo-600 hover:underline flex items-center gap-1">
<span x-text="open ? '▲ Masquer les filtres' : '▼ Filtres avancés'"></span>
@if($hasAdvanced)
<span class="ml-1 inline-flex items-center px-1.5 py-0.5 rounded-full text-xs bg-indigo-100 text-indigo-700">
<span class="ml-1 inline-flex items-center px-1.5 py-0.5 rounded-full text-xs bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700">
actifs
</span>
@endif
@@ -54,9 +54,9 @@
<div x-show="open" x-cloak class="mt-4 space-y-4">
<div class="grid grid-cols-3 gap-4">
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">Type de source</label>
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Type de source</label>
<select name="source_type_id"
class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value=""> Tous les types </option>
@foreach($sourceTypes as $st)
<option value="{{ $st->id }}" {{ request('source_type_id') == $st->id ? 'selected' : '' }}>
@@ -66,16 +66,16 @@
</select>
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">Année de début</label>
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Année de début</label>
<input type="number" name="annee_debut" value="{{ request('annee_debut') }}"
min="1000" max="2100" placeholder="ex : 1820"
class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">Année de fin</label>
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Année de fin</label>
<input type="number" name="annee_fin" value="{{ request('annee_fin') }}"
min="1000" max="2100" placeholder="ex : 1830"
class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
</div>
@@ -89,7 +89,7 @@
placeholder="— Tous les lieux —"
/>
@if($lieuSelectionne)
<p class="mt-1 text-xs text-gray-400">
<p class="mt-1 text-xs text-gray-400 dark:text-gray-500">
Inclut toutes les subdivisions de {{ $lieuSelectionne->nom_long ?? $lieuSelectionne->nom }}.
</p>
@endif
@@ -102,7 +102,7 @@
{{-- Résultats --}}
@if($resultats !== null)
<div>
<p class="text-sm text-gray-500 mb-3">
<p class="text-sm text-gray-500 dark:text-gray-400 mb-3">
@if($total === 0)
Aucun relevé trouvé.
@else
@@ -117,20 +117,20 @@
</p>
@if($resultats->isNotEmpty())
<div class="bg-white shadow rounded-lg overflow-hidden">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 text-sm">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Nom</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Prénom</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Source</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Type</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Nom</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Prénom</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Date</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Source</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Type</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($resultats as $releve)
@php
$data = $releve->data;
@@ -139,32 +139,32 @@
? ($dateEvt['valeur'] ?? '—') . ($dateEvt['calendrier'] !== 'gregorien' ? ' (' . $dateEvt['calendrier'] . ')' : '')
: ($releve->date_evenement ?? '—');
@endphp
<tr class="hover:bg-gray-50">
<td class="px-4 py-3 font-medium text-gray-900">
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-4 py-3 font-medium text-gray-900 dark:text-white">
@if(request('q') && $releve->nom)
{!! preg_replace('/(' . preg_quote(request('q'), '/') . ')/i', '<mark class="bg-yellow-100 rounded px-0.5">$1</mark>', e($releve->nom)) !!}
{!! preg_replace('/(' . preg_quote(request('q'), '/') . ')/i', '<mark class="bg-yellow-100 dark:bg-yellow-900/50 rounded px-0.5">$1</mark>', e($releve->nom)) !!}
@else
{{ $releve->nom ?? '—' }}
@endif
</td>
<td class="px-4 py-3 text-gray-700">
<td class="px-4 py-3 text-gray-700 dark:text-gray-300">
@if(request('q') && $releve->prenom)
{!! preg_replace('/(' . preg_quote(request('q'), '/') . ')/i', '<mark class="bg-yellow-100 rounded px-0.5">$1</mark>', e($releve->prenom)) !!}
{!! preg_replace('/(' . preg_quote(request('q'), '/') . ')/i', '<mark class="bg-yellow-100 dark:bg-yellow-900/50 rounded px-0.5">$1</mark>', e($releve->prenom)) !!}
@else
{{ $releve->prenom ?? '—' }}
@endif
</td>
<td class="px-4 py-3 text-gray-600 whitespace-nowrap">
<td class="px-4 py-3 text-gray-600 dark:text-gray-400 whitespace-nowrap">
{{ $dateAffichee }}
</td>
<td class="px-4 py-3 text-gray-600">
<td class="px-4 py-3 text-gray-600 dark:text-gray-400">
<a href="{{ route('sources.show', $releve->source) }}"
class="hover:text-indigo-600 hover:underline">
{{ $releve->source->nom }}
</a>
</td>
<td class="px-4 py-3">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-600">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400">
{{ $releve->source->sourceType->nom }}
</span>
</td>
@@ -181,7 +181,7 @@
</div>
@if($resultats->hasPages())
<div class="px-6 py-4 border-t border-gray-200">
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
{{ $resultats->links() }}
</div>
@endif
@@ -190,8 +190,8 @@
</div>
@else
{{-- État initial --}}
<div class="text-center py-16 text-gray-400">
<svg class="mx-auto w-12 h-12 mb-4 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<div class="text-center py-16 text-gray-400 dark:text-gray-500">
<svg class="mx-auto w-12 h-12 mb-4 text-gray-300 dark:text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
d="M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"/>
</svg>