aboutsummaryrefslogtreecommitdiffstats
path: root/static/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/app.js')
-rw-r--r--static/app.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/static/app.js b/static/app.js
index d16bd80..1296805 100644
--- a/static/app.js
+++ b/static/app.js
@@ -293,7 +293,13 @@ function tick() {
setInterval(tick, 1000);
document.addEventListener("pointerdown", touched, true);
// A fresh page is not dimmed, so a dim left by an earlier server goes too.
-fetch("/api/tablet").then((r) => r.json()).then((t) => { dimAfter = t.dim_after ?? 0; tablet("undim"); touched(); }).catch(() => {});
+fetch("/api/tablet").then((r) => r.json()).then((t) => {
+ dimAfter = t.dim_after ?? 0;
+ // [tablet] clock_font, served at /fonts/clock (deck.css).
+ dimmer.classList.toggle("font-time", !!t.clock_font);
+ dimmer.classList.toggle("font-date", !!t.clock_font && !!t.clock_font_date);
+ tablet("undim"); touched();
+}).catch(() => {});
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") {