Cleanup unused classes + setAttribute defs

This commit is contained in:
billz
2025-04-20 03:38:45 -07:00
parent 5c7ccfb64f
commit 3cb2e67387
2 changed files with 1 additions and 14 deletions

View File

@@ -662,22 +662,12 @@ a.inactive:focus {
}
.led-pulse {
/* animation: pulse 0.25s infinite; */
opacity: 0.3 !important;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.3; }
100% { opacity: 1; }
}
#hostapd-led {
.hostapd-led {
color: #28a745;
opacity: 1;
transition: opacity 0.05s;
}
#hostapd-led[data-active="true"] {
opacity: 0.3;
}

View File

@@ -1033,15 +1033,12 @@ function updateActivityLED() {
if (!isNaN(activity)) {
leds.forEach(led => {
if (activity > threshold_bytes) {
led.setAttribute('data-active', 'true');
led.classList.add('led-pulse');
setTimeout(() => {
led.removeAttribute('data-active');
led.classList.remove('led-pulse');
}, 50);
} else {
led.classList.remove('led-pulse');
led.removeAttribute('data-active');
}
});
}