mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-09 22:21:39 +02:00
parent
3cfa564171
commit
53624e466b
5 changed files with 25 additions and 23 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
(starting from release version `0.5.66`)
|
(starting from release version `0.5.66`)
|
||||||
|
|
||||||
|
## 0.5.92
|
||||||
|
* fix mobile menu
|
||||||
|
* fix inverters in select `serial.html` #709
|
||||||
|
|
||||||
## 0.5.91
|
## 0.5.91
|
||||||
* improved html and navi, navi is visible even when API dies #660
|
* improved html and navi, navi is visible even when API dies #660
|
||||||
* reduced maximum allowed JSON size for API to 6000Bytes #660
|
* reduced maximum allowed JSON size for API to 6000Bytes #660
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 5
|
#define VERSION_MINOR 5
|
||||||
#define VERSION_PATCH 91
|
#define VERSION_PATCH 92
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -35,7 +35,7 @@ iconSuccess = [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function topnav() {
|
function topnav() {
|
||||||
toggle("topnav");
|
toggle("topnav", "mobile");
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseNav(obj) {
|
function parseNav(obj) {
|
||||||
|
@ -85,12 +85,12 @@ function setHide(id, hide) {
|
||||||
elm.classList.remove('hide');
|
elm.classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle(id) {
|
function toggle(id, cl="hide") {
|
||||||
var e = document.getElementById(id);
|
var e = document.getElementById(id);
|
||||||
if(!e.classList.contains("hide"))
|
if(!e.classList.contains(cl))
|
||||||
e.classList.add("hide");
|
e.classList.add(cl);
|
||||||
else
|
else
|
||||||
e.classList.remove('hide');
|
e.classList.remove(cl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAjax(url, ptr, method="GET", json=null) {
|
function getAjax(url, ptr, method="GET", json=null) {
|
||||||
|
|
|
@ -6,20 +6,18 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
<div id="topnav" class="mobile">
|
<div id="topnav" class="mobile">
|
||||||
<div id="topnav" class="mobile">
|
<a id="nav2" class="hide" href="/live">Live</a>
|
||||||
<a id="nav2" class="hide" href="/live">Live</a>
|
<a id="nav3" class="hide" href="/serial">Serial / Control</a>
|
||||||
<a id="nav3" class="hide" href="/serial">Serial / Control</a>
|
<a id="nav4" class="hide" href="/setup">Settings</a>
|
||||||
<a id="nav4" class="hide" href="/setup">Settings</a>
|
<span class="seperator"></span>
|
||||||
<span class="seperator"></span>
|
<a id="nav5" class="hide" href="/update">Update</a>
|
||||||
<a id="nav5" class="hide" href="/update">Update</a>
|
<a id="nav6" class="hide" href="/system">System</a>
|
||||||
<a id="nav6" class="hide" href="/system">System</a>
|
<span class="seperator"></span>
|
||||||
<span class="seperator"></span>
|
<a id="nav7" href="/api" target="_blank">REST API</a>
|
||||||
<a id="nav7" href="/api" target="_blank">REST API</a>
|
<a id="nav8" href="https://ahoydtu.de" target="_blank">Documentation</a>
|
||||||
<a id="nav8" href="https://ahoydtu.de" target="_blank">Documentation</a>
|
<span class="seperator"></span>
|
||||||
<span class="seperator"></span>
|
<a id="nav0" class="hide" href="/login">Login</a>
|
||||||
<a id="nav0" class="hide" href="/login">Login</a>
|
<a id="nav1" class="hide" href="/logout">Logout</a>
|
||||||
<a id="nav1" class="hide" href="/logout">Logout</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="wifiicon" class="info"></div>
|
<div id="wifiicon" class="info"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
parseESP(obj);
|
parseESP(obj);
|
||||||
window.setInterval("getAjax('/api/generic', parseGeneric)", 10000);
|
window.setInterval("getAjax('/api/generic', parseGeneric)", 10000);
|
||||||
exeOnce = false;
|
exeOnce = false;
|
||||||
getAjax("/api/setup", parse);
|
getAjax("/api/inverter/list", parse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,8 +74,8 @@
|
||||||
|
|
||||||
if(null == root) return;
|
if(null == root) return;
|
||||||
root = root.inverter;
|
root = root.inverter;
|
||||||
for(var i = 0; i < root.inverter.length; i++) {
|
for(var i = 0; i < root.length; i++) {
|
||||||
inv = root.inverter[i];
|
inv = root[i];
|
||||||
var opt = document.createElement('option');
|
var opt = document.createElement('option');
|
||||||
opt.value = inv.id;
|
opt.value = inv.id;
|
||||||
opt.innerHTML = inv.name;
|
opt.innerHTML = inv.name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue