From 9f563b4891126d972d7538d7739437f11353a330 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Tue, 24 Mar 2026 14:25:00 -0300 Subject: [PATCH] update peer last handshake colors --- .../wireguard/peer_list/script_wireguard_status_update.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/wireguard/peer_list/script_wireguard_status_update.html b/templates/wireguard/peer_list/script_wireguard_status_update.html index 1c56779..c2849fa 100644 --- a/templates/wireguard/peer_list/script_wireguard_status_update.html +++ b/templates/wireguard/peer_list/script_wireguard_status_update.html @@ -291,13 +291,15 @@ const handshakeAge = Date.now() / 1000 - parseInt(latestHandshake); if (latestHandshake === '0') { - calloutDiv.classList.add('callout-danger'); + // never connected — neutral, no class } else if (handshakeAge < 600) { calloutDiv.classList.add('callout-success'); } else if (handshakeAge < 1800) { calloutDiv.classList.add('callout-info'); } else if (handshakeAge < 21600) { calloutDiv.classList.add('callout-warning'); + } else { + calloutDiv.classList.add('callout-danger'); } calloutDiv.style.transition = 'all 5s'; };