From 2b85c4bec0dafd5bd0ac2d9df641635c2fce38c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alo=C3=AFs=20Coquillard?= Date: Sun, 24 May 2026 07:56:05 +0000 Subject: [PATCH] corriger affichage hors ligne --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b18cf35..bee2768 100644 --- a/index.html +++ b/index.html @@ -331,8 +331,11 @@ function getStatus(results) { } const downSinceMs = Date.now() - new Date(last.timestamp).getTime(); const lastSuccess = results.find(r => r.success); - if (lastSuccess) return { state: 'warn', text: 'Hors ligne depuis ' + formatDuration(downSinceMs) }; - return { state: 'err', text: 'Hors ligne depuis ' + formatDuration(downSinceMs) }; + const downText = downSinceMs >= 2 * 60 * 60 * 1000 + ? 'Hors ligne depuis plus de 2h' + : 'Hors ligne depuis ' + formatDuration(downSinceMs); + if (lastSuccess) return { state: 'warn', text: downText }; + return { state: 'err', text: downText }; } function renderCard(game, statusData) {