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'; };