More work on webserver

This commit is contained in:
2026-03-07 19:32:24 +01:00
parent 90d5261670
commit 99668574b3
9 changed files with 119 additions and 80 deletions

View File

@@ -68,10 +68,11 @@
}
function update() {
let now = (new Date()).getTime();
let is_connected = (lastUpdate + 3 * updateInterval) > now;
let ce = document.getElementById('connected');
let cl = document.getElementById('conn_label');
if (ce) {
if ((lastUpdate + 3 * updateInterval) > now) {
if (is_connected) {
ce.classList.add('ok');
cl.textContent = 'connected';
}
@@ -108,10 +109,12 @@
resetForm();
}
})
// check if any dynamic list needs update
for (let l in dynLists) {
if (loadDynList(l)) {
updateDynLists(l, configDefinitions)
if (is_connected) {
// check if any dynamic list needs update
for (let l in dynLists) {
if (loadDynList(l)) {
updateDynLists(l, configDefinitions)
}
}
}
}
@@ -942,6 +945,7 @@
forEl('#adminPassInput', function (el) {
el.value = '';
});
alert("Admin password not cached anymore.");
}
function ensurePass() {
return new Promise(function (resolve, reject) {