Push new static for testing

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface
2023-02-12 21:42:53 +00:00
parent fdf489ccf9
commit fd99eb58d8
5 changed files with 243 additions and 4 deletions

View File

@@ -129,4 +129,10 @@ async function vibe(type) {
default:
navigator.vibrate(30)
}
}
async function convertUnixLocal(unix) {
var jsTime = unix*1000
var dt = new Date(jsTime)
return dt.toLocaleString()
}

View File

@@ -14,7 +14,7 @@ async function display(data) {
document.getElementById('server_host').textContent = `HOST: ${data.host}`;
let dat = data.dat[0]
console.log(JSON.stringify(dat))
document.getElementById('time').textContent = dat.since;
document.getElementById('time').textContent = convertUnixLocal(dat.since);
document.getElementById('ldbws').textContent = dat.ldbws || "0";
document.getElementById('ldbsvws').textContent = dat.ldbsvws || "0";
document.getElementById('corpus').textContent = dat.corpus || "0";