From c6be3b67ac711c02a15500a69dd2f1d957064dcd Mon Sep 17 00:00:00 2001 From: UltraLionFr Date: Thu, 28 Aug 2025 15:58:20 +0200 Subject: [PATCH] chore: modification interface transcript --- events/clients/transcript-server.js | 110 +++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/events/clients/transcript-server.js b/events/clients/transcript-server.js index 30fd428..c60ad5e 100644 --- a/events/clients/transcript-server.js +++ b/events/clients/transcript-server.js @@ -12,16 +12,122 @@ module.exports = { app.use('/transcript', express.static(transcriptsPath)); + // Page d'accueil (http://localhost:5417/) app.get('/', (req, res) => { - res.send('✅ Serveur Transcript actif. Utilise /transcript/:id pour voir un ticket.'); + res.send(` + + + + Serveur Transcript + + + +
+

📑 Serveur Transcript

+

✅ Le service est actif.

+

Accède à un transcript avec l’URL :

+

/transcript/ID_DU_TICKET

+
QuantumCraft Studios - ${new Date().getFullYear()}
+
+ + + `); }); + // Page spéciale si quelqu’un tape /transcript/ sans ID + app.get('/transcript/', (req, res) => { + res.send(` + + + + Transcript + + + +
+

❌ Aucun transcript spécifié

+

👉 Utilise /transcript/<ID_DU_TICKET> pour accéder à un transcript.

+
+ + + `); + }); + + // Page d'un transcript spécifique app.get('/transcript/:id', (req, res) => { const file = path.join(transcriptsPath, `${req.params.id}.html`); if (fs.existsSync(file)) { res.sendFile(file); } else { - res.status(404).send('❌ Transcript introuvable'); + res.status(404).send(` + + Transcript introuvable + +

❌ Transcript introuvable

+

L’ID ${req.params.id} ne correspond à aucun ticket sauvegardé.

+ + + `); } });