From a9befb25ab964202bff4db7faafc6c3c9eeece1c Mon Sep 17 00:00:00 2001 From: Jules Neny Date: Sat, 3 Oct 2026 09:20:16 +0200 Subject: [PATCH] =?UTF-8?q?fix(vue-fiches):=20passe=20/autofeedback=20?= =?UTF-8?q?=E2=80=94=20=C3=89chap=20dans=20un=20champ=20garde=20le=20broui?= =?UTF-8?q?llon,=20titre=20d'onglet=20=3D=20fiche=20ouverte,=20contrastes?= =?UTF-8?q?=20et=20mini-carte=20d=C3=A9corative=20de=20FicheDetail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AGNSEFZdoKvbdsGyfSnu5S --- components/FicheDetail.vue | 27 ++++++++++++++------------- components/VueFiches.vue | 13 ++++++++++--- pages/agences.vue | 3 ++- pages/index.vue | 3 ++- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/components/FicheDetail.vue b/components/FicheDetail.vue index d88007f..32f33ed 100644 --- a/components/FicheDetail.vue +++ b/components/FicheDetail.vue @@ -35,14 +35,14 @@ -
+
{{ org.echelle }} - {{ org.territoire }} - {{ org.localisation_ville }} + {{ org.territoire }} + {{ org.localisation_ville }}
@@ -73,7 +73,7 @@
-

Description communauté

+

Description communauté

{{ descriptionUser }}

@@ -82,7 +82,7 @@
-

+

-

Points clés

+

Points clés

  • -
    +
    @@ -153,7 +153,7 @@
    -

    +

    Tes suggestions seront transmises à l'équipe AEP par email.

    @@ -184,7 +184,7 @@

    {{ reportError }}

    {{ reportSuccess }}

    -

    +

    {{ reportMessage.length }}/500

    @@ -331,7 +331,8 @@ async function initMap(el: HTMLElement) { iconAnchor: [7, 7], }) - L.marker([lat, lng], { icon }).addTo(map) + // Épingle décorative : ni clic ni clavier (la mini-carte est une image, nommée par son conteneur) + L.marker([lat, lng], { icon, interactive: false, keyboard: false }).addTo(map) } @@ -342,7 +343,7 @@ async function initMap(el: HTMLElement) { align-items: center; gap: 6px; font-size: 0.78rem; - color: var(--nav-text-muted); + color: color-mix(in srgb, var(--nav-text) 78%, transparent); background: none; border: none; cursor: pointer; diff --git a/components/VueFiches.vue b/components/VueFiches.vue index e07f55c..fc6cf51 100644 --- a/components/VueFiches.vue +++ b/components/VueFiches.vue @@ -459,11 +459,18 @@ watch(() => props.vf.ficheId, (id, avant) => { }) function clavierDetail(e: KeyboardEvent) { - if (e.key === 'Escape') { e.preventDefault(); props.vf.fermerFiche(); return } + const t = e.target as HTMLElement + const champ = !!t.closest('input, textarea, select, [contenteditable="true"]') + if (e.key === 'Escape') { + e.preventDefault() + // Échap dans un champ (commentaire, signalement) le quitte d'abord : un brouillon ne se perd pas d'une touche + if (champ) { detail.value?.focus({ preventScroll: true }); return } + props.vf.fermerFiche() + return + } if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return - const t = e.target as HTMLElement - if (t.closest('input, textarea, select, [contenteditable="true"]')) return + if (champ) return e.preventDefault() if (e.key === 'ArrowLeft') props.vf.fichePrecedente() else props.vf.ficheSuivante() diff --git a/pages/agences.vue b/pages/agences.vue index e807ec6..bfc83e3 100644 --- a/pages/agences.vue +++ b/pages/agences.vue @@ -250,7 +250,8 @@ onMounted(() => { } catch {} }) -useHead({ title: "AEP - Réseaux de bifurcation architecturale" }) +// Une fiche ouverte donne son nom à l'onglet (les données arrivent après le rendu serveur ici) +useHead({ title: computed(() => (vf.ficheOuverte ? `${vf.ficheOuverte.nom} — AEP` : 'AEP - Réseaux de bifurcation architecturale')) })