aboutsummaryrefslogtreecommitdiffstats
path: root/static/dashboard.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-11 20:29:51 +0100
committerDanilo M. <danix@danix.xyz>2026-11-11 20:29:51 +0100
commitc6f23856f080feee37c4972fb6689332b9873574 (patch)
tree26ded8cf2dd6b70639adc4101e98eaaa09541d43 /static/dashboard.js
parent1c3efe5835101bbff1518031f988ae1b8ec70aa1 (diff)
downloaddeck-it-c6f23856f080feee37c4972fb6689332b9873574.tar.gz
deck-it-c6f23856f080feee37c4972fb6689332b9873574.zip
feat(dashboard): rain into the battery chip while charging
Streaks fall right to left across the empty part of the battery bar into the fill's edge while the tablet reports charging; still under prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/dashboard.js')
-rw-r--r--static/dashboard.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/static/dashboard.js b/static/dashboard.js
index 21e1cf3..70fdd6c 100644
--- a/static/dashboard.js
+++ b/static/dashboard.js
@@ -238,6 +238,7 @@ export default {
const charging = b.status === "charging" || b.status === "full";
$(".c-bat .ic").textContent = batteryGlyph(b);
chip(".c-bat", b.level != null ? `${b.level}%` : "—", null, b.level, b.level < 20 && !charging);
+ $(".c-bat").classList.toggle("charging", b.status === "charging");
chip(".c-wifi", w.rssi != null ? `${w.rssi} dBm` : "—", w.band ?? "",
w.rssi == null ? 0 : 2 * (w.rssi + 100)); // -100 dBm empty, -50 full
});