From 00c266f6a706aced267ee8ce0ce6629f8035b8c4 Mon Sep 17 00:00:00 2001 From: Roby Date: Sun, 19 Apr 2026 19:42:29 +0200 Subject: [PATCH] update index.html --- templates/index.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/templates/index.html b/templates/index.html index 6f224ee..6b17cfe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -85,6 +85,8 @@ @keyframes pulse-glow { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } } .blink { animation: pulse-glow 1.5s infinite; color: var(--danger) !important; font-weight: 800 !important; background: rgba(239, 68, 68, 0.1) !important; border-left-color: var(--danger) !important; } + @keyframes tx-glow { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } } + .tx-active { animation: tx-glow 1.5s infinite; font-weight: 800 !important; color: var(--text-main) !important; background: rgba(59, 130, 246, 0.25) !important; border-left-color: var(--primary) !important; } /* Modals (Dark Glass) */ .modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); z-index:1000; align-items:center; justify-content:center; } @@ -735,9 +737,9 @@ if (val.includes("🎙️")) { isTx = true; - div.classList.add('blink'); + div.classList.add('tx-active'); } else { - div.classList.remove('blink'); + div.classList.remove('tx-active'); div.style.setProperty('color', 'var(--text-main)', 'important'); div.style.setProperty('border-left-color', 'var(--primary)', 'important'); div.style.setProperty('background', 'rgba(59, 130, 246, 0.1)', 'important'); @@ -792,12 +794,20 @@ if (isOnline) { cardDiv.classList.add('online'); statusDiv.classList.remove('status-offline'); cardDiv.style.opacity = "1"; cardDiv.style.filter = "none"; + let targetBorderColor = activeModeColor; - if (isTx) { targetBorderColor = (telemetryObj.alt === "") ? "var(--danger)" : activeModeColor; } else if (isIdle) { targetBorderColor = "var(--border-color)"; } + if (!isTx && isIdle) { targetBorderColor = "var(--border-color)"; } cardDiv.style.setProperty('border-top-color', targetBorderColor, 'important'); if(isTx) { - cardDiv.style.boxShadow = `0 0 20px rgba(${targetBorderColor === 'var(--danger)' ? '239,68,68' : '16,185,129'}, 0.4)`; + // Creiamo un alone luminoso che sia SEMPRE dello stesso colore del modo attivo + let shadowRGB = '59, 130, 246'; // Blu di default (per DMR e var(--primary)) + if (activeModeColor === '#10b981') shadowRGB = '16, 185, 129'; // Verde (NXDN) + else if (activeModeColor === '#8b5cf6') shadowRGB = '139, 92, 246'; // Viola (YSF) + else if (activeModeColor === '#06b6d4') shadowRGB = '6, 182, 212'; // Ciano (D-STAR) + else if (activeModeColor === '#f59e0b') shadowRGB = '245, 158, 11'; // Arancione (P25) + + cardDiv.style.boxShadow = `0 0 20px rgba(${shadowRGB}, 0.5)`; } else { cardDiv.style.boxShadow = 'var(--glass-shadow)'; }