aboutsummaryrefslogtreecommitdiffstats
path: root/static/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/app.js')
-rw-r--r--static/app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/static/app.js b/static/app.js
index c91876b..3e75a4b 100644
--- a/static/app.js
+++ b/static/app.js
@@ -113,7 +113,8 @@ function poll(name, seconds, update) {
const tick = async () => {
try {
const r = await fetch(`/api/${name}`);
- if (r.headers.get("X-Deckit-Sleep")) return goodnight("The PC is asleep");
+ const why = r.headers.get("X-Deckit-Sleep");
+ if (why) return goodnight(`The PC is ${why}`);
awake();
if (r.ok) update(await r.json());
} catch {