Kiosk start, offline and setup pages in the InfoFlow display style
Dark grey background, name top left, date and clock top right, a flat panel with a blue top edge. The pages show the kiosk link (token masked) and the management address; the clock code is shared in kiosk.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
efc581e0ae
commit
19595aaf39
11 files changed
+169
-89
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Shared by the local kiosk pages: device name, clock/date, kiosk link and admin address.
|
||||
const params = new URLSearchParams(location.search);
|
||||
const fmtTime = new Intl.DateTimeFormat("nl-NL", { hour: "2-digit", minute: "2-digit" });
|
||||
const fmtDate = new Intl.DateTimeFormat("nl-NL", { weekday: "long", day: "numeric", month: "long" });
|
||||
|
||||
function setText(id, text) {
|
||||
const el = document.getElementById(id);
|
||||
if (el) el.textContent = text;
|
||||
}
|
||||
|
||||
setText("name", params.get("name") || "VoxIP Kiosk");
|
||||
// The link arrives with its token already masked (…abcd).
|
||||
const link = (params.get("url") || "").replace(/^https:\/\//, "");
|
||||
if (link) setText("link-url", link);
|
||||
else document.getElementById("link")?.setAttribute("hidden", "");
|
||||
setText("admin", params.get("admin") ? "Beheer: " + params.get("admin") : "");
|
||||
|
||||
function tickClock() {
|
||||
const now = new Date();
|
||||
setText("clock", fmtTime.format(now));
|
||||
const date = fmtDate.format(now);
|
||||
setText("date", date.charAt(0).toUpperCase() + date.slice(1));
|
||||
}
|
||||
tickClock();
|
||||
setInterval(tickClock, 1000);
|
||||
Reference in new issue
Block a user