Product name (Daynivo Kiosk OS), default device name, kiosk screens, service descriptions, installer output and docs. Internal names (voxip-kiosk-*, /etc/voxip-kiosk, user voxip, VOXIP_* variables) stay. An update renames a device still called "VoxIP Kiosk" to the new default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
// 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") || "Daynivo 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);
|