Browse Source

0.5.92

fix mobile menu
fix inverters in select `serial.html` #709
pull/729/head
lumapu 2 years ago
parent
commit
53624e466b
  1. 4
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 10
      src/web/html/api.js
  4. 2
      src/web/html/includes/nav.html
  5. 6
      src/web/html/serial.html

4
src/CHANGES.md

@ -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

2
src/defines.h

@ -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 {

10
src/web/html/api.js

@ -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) {

2
src/web/html/includes/nav.html

@ -5,7 +5,6 @@
<span></span> <span></span>
<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>
@ -20,7 +19,6 @@
<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>

6
src/web/html/serial.html

@ -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…
Cancel
Save