From c52fa6007dfbeb9b22c9924020a7483d5b344e33 Mon Sep 17 00:00:00 2001 From: Yvv Date: Thu, 19 Mar 2026 05:41:24 +0100 Subject: [PATCH] =?UTF-8?q?Page=20/messages=20:=20afficher=20les=20r=C3=A9?= =?UTF-8?q?ponses=20publi=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Type badge + auteur + date comme sur la home - Réponse avec liaison graphique (reply-thread/connector/block) - Style adaptatif light/dark cohérent avec HomeMessages.vue Co-Authored-By: Claude Sonnet 4.6 --- app/pages/messages.vue | 86 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 7 deletions(-) diff --git a/app/pages/messages.vue b/app/pages/messages.vue index e7226cc..146ca9d 100644 --- a/app/pages/messages.vue +++ b/app/pages/messages.vue @@ -2,20 +2,33 @@

Messages des visiteurs

-

Les mots laissés par celles et ceux qui passent par ici.

+

Les mots laissés par celles et ceux qui passent par ici.

-

{{ msg.text }}

-
- {{ msg.author }} - · - {{ formatDate(msg.createdAt) }} + +
+ {{ msg.author }} + {{ typeLabel(msg.type) }} + {{ formatDate(msg.createdAt) }} +
+ +

{{ msg.text }}

+ +
+
-

Aucun message pour l'instant.

+

Aucun message pour l'instant.

@@ -34,6 +47,16 @@ useHead({ const { data: messages } = await useFetch('/api/messages') +const TYPE_LABELS: Record = { + question: 'Question', + suggestion: 'Suggestion', + retour: 'Retour', +} + +function typeLabel(type: string) { + return TYPE_LABELS[type] ?? type +} + function formatDate(iso: string) { const date = new Date(iso) return date.toLocaleDateString('fr-FR', { day: 'numeric', month: 'long', year: 'numeric' }) @@ -41,10 +64,59 @@ function formatDate(iso: string) {