From 4fb0b34fccc80b963b357ed432c6fdd8f4e18dee Mon Sep 17 00:00:00 2001
From: Fred Boniface A cache error means that some users are seeing a faulty layout on departure board pages,
- an update to fix this has been made available but it may take a few days for this fix to
- be downloaded to your device.
+ A fault with our bandwidth provider is causing intermittent connectivity. Apologies for any inconvenience. Customise your quick links on the Settings page. A ${svc.operator} service A ${svc.operator} service A ${svc.operator} service`
if (svc.length) {
- opRow += `, with ${svc.length} carriages`;
+ opRow += ` with ${svc.length} carriages
Registering
+" + message + "
" + cmd.insertAdjacentHTML("beforeend", html) +} + +async function registerKey(key) { + var url = `${window.location.origin}/api/v1/auth/register`; + let res = await fetch(url, { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + redirect: "follow", + body: JSON.stringify(key) + }) + if (res.JSON['result'] == "ok"){ + return true; + } else { + return false; + } +} + +async function init(){ + cmdOut("Reading registration key"); + const key = await getQuery("key"); + cmdOut(`Key: ${key}`) + cmdOut("Requesting API Key from server"); + let res = await registerKey(key); + console.log(JSON.stringify(res)) +} \ No newline at end of file diff --git a/sw.js b/sw.js index 9324685..08250ac 100644 --- a/sw.js +++ b/sw.js @@ -1,10 +1,11 @@ /* Service Worker */ -const appVersion = "1.2.4" +const appVersion = "1.3.0" const cacheName = `owlboard-${appVersion}`; const cacheIDs = [cacheName]; const cacheFiles = [ "/404.html", + "/auth.html", "/board.html", "/conn-err.html", "/help.html", @@ -28,6 +29,7 @@ const cacheFiles = [ "/js/issue.js", "/js/lib.board.js", "/js/lib.main.js", + "/js/auth.js", "/js/settings.js", "/js/simple-board.js", "/images/icon.svg", -- 2.34.1 From d7a0ba246fcd976067609412abd625f79e3d70a7 Mon Sep 17 00:00:00 2001 From: Fred Boniface