factory reset formats entire little fs

renamed sunrise / sunset on indext.html to start / stop communication
show system information only if called directly from menu
This commit is contained in:
lumapu 2022-12-18 00:47:45 +01:00
parent e1b6fe1344
commit b2fc16e030
8 changed files with 50 additions and 29 deletions

View file

@ -55,6 +55,7 @@
for (const [key, value] of Object.entries(obj)) {
if(!data.includes(key) || (typeof value == 'undefined')) continue;
var li = document.createElement("li");
li.appendChild()
li.appendChild(document.createTextNode(key + ": " + value));
ul.appendChild(li);
}
@ -86,10 +87,6 @@
if(null != obj) {
parseMenu(obj["menu"]);
parseSys(obj["system"]);
parseSysInfo(obj["system"]);
parseRadio(obj["system"]["radio"]);
var e = document.getElementById("system");
e.innerHTML = obj["html"];
if(null != obj["refresh"]) {
var meta = document.createElement('meta');
@ -97,6 +94,12 @@
meta.content = obj["refresh"] + "; URL=" + obj["refresh_url"];
document.getElementsByTagName('head')[0].appendChild(meta);
}
else {
parseSysInfo(obj["system"]);
parseRadio(obj["system"]["radio"]);
}
var e = document.getElementById("system");
e.innerHTML = obj["html"];
}
}