Skip to content

Commit

Permalink
0.8.91
Browse files Browse the repository at this point in the history
* fix javascript issues #1480
  • Loading branch information
lumapu committed Mar 5, 2024
1 parent e5c0e8e commit 7b030a3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
19 changes: 10 additions & 9 deletions scripts/htmlPreprocessorDefines.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ def check(inp, lst, pattern):
x = re.findall(pattern, line)
if len(x) > 0:
if line.find("ENDIF_") != -1:
if q.empty():
error("missing open statement!")
if q.get() != x[0]:
error("wrong close statement!")
keep = True
if not q.empty():
e = q.get()
if e[0] == x[0]:
keep = e[1]
elif line.find("IF_") != -1:
q.put(x[0])
q.put((x[0], keep))
if keep is True:
keep = x[0] in lst
elif line.find("E") != -1:
if q.empty():
error("missing open statement!")
keep = not keep
error("(ELSE) missing open statement!")
e = q.get()
q.put(e)
if e[1] is True:
keep = not keep
else:
if keep is True:
out.append(line)

return out

def conv(inp, lst):
Expand Down
3 changes: 3 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Development Changes

## 0.8.91 - 2024-03-05
* fix javascript issues #1480

## 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
* auto build minimal English versions of ESP8266 and ESP32
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 90
#define VERSION_PATCH 91

//-------------------------------------
typedef struct {
Expand Down
4 changes: 3 additions & 1 deletion src/web/html/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ function topnav() {
}

function parseNav(obj) {
for(i = 0; i < 13; i++) {
for(i = 0; i < 14; i++) {
if(i == 2)
continue;
var l = document.getElementById("nav"+i);
if(null == l)
continue
if(12 == i) {
if(obj.cst_lnk.length > 0) {
l.href = obj.cst_lnk
Expand Down
3 changes: 2 additions & 1 deletion src/web/html/includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<a id="nav7" class="hide" href="/system?v={#VERSION}">System</a>
<span class="separator"></span>
<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="nav12" href="#" class="hide" target="_blank">Custom Link</a>
<span class="separator"></span>
Expand Down
3 changes: 2 additions & 1 deletion src/web/html/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@

/*IF_PLUGIN_DISPLAY*/
function parseDisplay(obj, type, system) {
var pinList = esp8266pins;
/*IF_ESP32*/
var pinList = esp32pins;
/*IF_ESP32-S2*/
Expand All @@ -1102,6 +1101,8 @@
/*IF_ESP32-C3*/
pinList = esp32c3pins;
/*ENDIF_ESP32-C3*/
/*ELSE*/
var pinList = esp8266pins;
/*ENDIF_ESP32*/

for(var i of ["disp_pwr"])
Expand Down

0 comments on commit 7b030a3

Please sign in to comment.