Browse Source

0.8.91 - zero

Merge branch 'development03' into zero-export
pull/1521/head
lumapu 7 months ago
parent
commit
6b2708dd27
  1. 17
      scripts/htmlPreprocessorDefines.py
  2. 3
      src/CHANGES.md
  3. 2
      src/defines.h
  4. 4
      src/web/html/api.js
  5. 3
      src/web/html/includes/nav.html
  6. 3
      src/web/html/setup.html

17
scripts/htmlPreprocessorDefines.py

@ -14,23 +14,24 @@ def check(inp, lst, pattern):
x = re.findall(pattern, line) x = re.findall(pattern, line)
if len(x) > 0: if len(x) > 0:
if line.find("ENDIF_") != -1: if line.find("ENDIF_") != -1:
if q.empty(): if not q.empty():
error("missing open statement!") e = q.get()
if q.get() != x[0]: if e[0] == x[0]:
error("wrong close statement!") keep = e[1]
keep = True
elif line.find("IF_") != -1: elif line.find("IF_") != -1:
q.put(x[0]) q.put((x[0], keep))
if keep is True: if keep is True:
keep = x[0] in lst keep = x[0] in lst
elif line.find("E") != -1: elif line.find("E") != -1:
if q.empty(): if q.empty():
error("missing open statement!") error("(ELSE) missing open statement!")
e = q.get()
q.put(e)
if e[1] is True:
keep = not keep keep = not keep
else: else:
if keep is True: if keep is True:
out.append(line) out.append(line)
return out return out
def conv(inp, lst): def conv(inp, lst):

3
src/CHANGES.md

@ -1,5 +1,8 @@
# Development Changes # Development Changes
## 0.8.91 - 2024-03-05
* fix javascript issues #1480
## 0.8.90 - 2024-03-05 ## 0.8.90 - 2024-03-05
* added preprocessor defines to HTML (from platform.ini) to reduce the HTML in size if modules aren't enabled * added preprocessor defines to HTML (from platform.ini) to reduce the HTML in size if modules aren't enabled
* auto build minimal English versions of ESP8266 and ESP32 * auto build minimal English versions of ESP8266 and ESP32

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_PATCH 900001 #define VERSION_PATCH 910001
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

4
src/web/html/api.js

@ -84,10 +84,12 @@ function topnav() {
} }
function parseNav(obj) { function parseNav(obj) {
for(i = 0; i < 13; i++) { for(i = 0; i < 14; i++) {
if(i == 2) if(i == 2)
continue; continue;
var l = document.getElementById("nav"+i); var l = document.getElementById("nav"+i);
if(null == l)
continue
if(12 == i) { if(12 == i) {
if(obj.cst_lnk.length > 0) { if(obj.cst_lnk.length > 0) {
l.href = obj.cst_lnk l.href = obj.cst_lnk

3
src/web/html/includes/nav.html

@ -17,7 +17,8 @@
<a id="nav7" class="hide" href="/system?v={#VERSION}">System</a> <a id="nav7" class="hide" href="/system?v={#VERSION}">System</a>
<span class="separator"></span> <span class="separator"></span>
<a id="nav8" href="/api" target="_blank">REST API</a> <a id="nav8" href="/api" target="_blank">REST API</a>
<a id="nav9" href="https://ahoydtu.de" target="_blank">{#NAV_DOCUMENTATION}</a> <a id="nav9" href="https://docs.ahoydtu.de" target="_blank">{#NAV_DOCUMENTATION}</a>
<a id="nav13" href="https://ahoydtu.de" target="_blank">Website</a>
<a id="nav10" href="/about?v={#VERSION}">{#NAV_ABOUT}</a> <a id="nav10" href="/about?v={#VERSION}">{#NAV_ABOUT}</a>
<a id="nav12" href="#" class="hide" target="_blank">Custom Link</a> <a id="nav12" href="#" class="hide" target="_blank">Custom Link</a>
<span class="separator"></span> <span class="separator"></span>

3
src/web/html/setup.html

@ -1107,7 +1107,6 @@
/*IF_PLUGIN_DISPLAY*/ /*IF_PLUGIN_DISPLAY*/
function parseDisplay(obj, type, system) { function parseDisplay(obj, type, system) {
var pinList = esp8266pins;
/*IF_ESP32*/ /*IF_ESP32*/
var pinList = esp32pins; var pinList = esp32pins;
/*IF_ESP32-S2*/ /*IF_ESP32-S2*/
@ -1119,6 +1118,8 @@
/*IF_ESP32-C3*/ /*IF_ESP32-C3*/
pinList = esp32c3pins; pinList = esp32c3pins;
/*ENDIF_ESP32-C3*/ /*ENDIF_ESP32-C3*/
/*ELSE*/
var pinList = esp8266pins;
/*ENDIF_ESP32*/ /*ENDIF_ESP32*/
for(var i of ["disp_pwr"]) for(var i of ["disp_pwr"])

Loading…
Cancel
Save