added login / logout

prepared static IP storage and disable inverter
IMPORTANT: new memory layout, your inverter settings will be lost
This commit is contained in:
lumapu 2022-11-02 22:41:31 +01:00
parent 56b8096bed
commit 6a6d522d3b
11 changed files with 290 additions and 31 deletions

View file

@ -17,11 +17,7 @@
<div id="topnav" class="hide"></div>
</div>
<div id="wrapper">
<div id="content">
<a href="/factory" class="btn">Factory Reset</a><br/>
<br/>
<a href="/reboot" class="btn">Reboot</a>
</div>
<div id="content"></div>
</div>
<div id="footer">
<div class="left">
@ -45,10 +41,19 @@
if(null != obj) {
parseMenu(obj["menu"]);
parseSys(obj["system"]);
var e = document.getElementById("content");
e.innerHTML = obj["html"];
if(null != obj["refresh"]) {
var meta = document.createElement('meta');
meta.httpEquiv = "refresh"
meta.content = obj["refresh"] + "; URL=" + obj["refresh_url"];
document.getElementsByTagName('head')[0].appendChild(meta);
}
}
}
getAjax("/api/index", parse);
getAjax("/api" + window.location.pathname, parse);
</script>
</body>
</html>