Browse Source

0.8.71

* fix autologin bug if no password is set
* translated `/serial`
pull/1402/head
lumapu 8 months ago
parent
commit
80d07ae6fe
  1. 2
      src/CHANGES.md
  2. 2
      src/web/Protection.h
  3. 4
      src/web/RestApi.h
  4. 10
      src/web/html/serial.html
  5. 30
      src/web/lang.json
  6. 1
      src/web/web.h

2
src/CHANGES.md

@ -7,6 +7,8 @@
* removed add to total (MqTT) inverter setting
* fixed sending commands to inverters which are soft turned off
* save settings before they are exported #1395
* fix autologin bug if no password is set
* translated `/serial`
## 0.8.70 - 2024-02-01
* prevent sending commands to inverter which isn't active #1387

2
src/web/Protection.h

@ -39,7 +39,7 @@ class Protection {
// auto logout
if(0 != mLogoutTimeout) {
if (0 == --mLogoutTimeout) {
if(mPwd[0] == '\0')
if(mPwd[0] != '\0')
mProtected = true;
}
}

4
src/web/RestApi.h

@ -259,6 +259,8 @@ class RestApi {
}
void getGeneric(AsyncWebServerRequest *request, JsonObject obj) {
mApp->resetLockTimeout();
obj[F("wifi_rssi")] = (WiFi.status() != WL_CONNECTED) ? 0 : WiFi.RSSI();
obj[F("ts_uptime")] = mApp->getUptime();
obj[F("ts_now")] = mApp->getTimestamp();
@ -268,7 +270,7 @@ class RestApi {
obj[F("env")] = String(ENV_NAME);
obj[F("menu_prot")] = mApp->isProtected(request->client()->remoteIP().toString().c_str());
obj[F("menu_mask")] = (uint16_t)(mConfig->sys.protectionMask );
obj[F("menu_protEn")] = (bool) (strlen(mConfig->sys.adminPwd) > 0);
obj[F("menu_protEn")] = (bool) (mConfig->sys.adminPwd[0] != '\0');
obj[F("cst_lnk")] = String(mConfig->plugin.customLink);
obj[F("cst_lnk_txt")] = String(mConfig->plugin.customLinkText);
obj[F("region")] = mConfig->sys.region;

10
src/web/html/serial.html

@ -12,12 +12,12 @@
<textarea id="serial" class="mt-3" cols="80" rows="40" readonly></textarea>
</div>
<div class="row my-3">
<div class="col-3">console active: <span class="dot" id="active"></span></div>
<div class="col-3 col-sm-4 my-3">Uptime: <span id="uptime"></span></div>
<div class="col-3">{#CONSOLE_ACTIVE}: <span class="dot" id="active"></span></div>
<div class="col-3 col-sm-4 my-3">{#UPTIME}: <span id="uptime"></span></div>
<div class="col-6 col-sm-4 a-r">
<input type="button" value="clear" class="btn" id="clear"/>
<input type="button" value="autoscroll" class="btn" id="scroll"/>
<input type="button" value="copy" class="btn" id="copy"/>
<input type="button" value="{#BTN_CLEAR}" class="btn" id="clear"/>
<input type="button" value="{#BTN_AUTOSCROLL}" class="btn" id="scroll"/>
<input type="button" value="{#BTN_COPY}" class="btn" id="copy"/>
</div>
</div>
</div>

30
src/web/lang.json

@ -865,6 +865,36 @@
}
]
},
{
"name": "serial.html",
"list": [
{
"token": "BTN_CLEAR",
"en": "clear",
"de": "l&ouuml;schen"
},
{
"token": "BTN_AUTOSCROLL",
"en": "autoscroll",
"de": "automatisch scrollen"
},
{
"token": "BTN_COPY",
"en": "copy",
"de": "kopieren"
},
{
"token": "CONSOLE_ACTIVE",
"en": "console active",
"de": "Konsole aktiv"
},
{
"token": "UPTIME",
"en": "uptime",
"de": "Laufzeit"
}
]
},
{
"name": "index.html",
"list": [

1
src/web/web.h

@ -387,7 +387,6 @@ class Web {
AsyncWebServerResponse *response = request->beginResponse_P(200, favicon_type, favicon_ico, favicon_ico_len);
response->addHeader(F("Content-Encoding"), "gzip");
request->send(response);
mApp->resetLockTimeout();
}
void showNotFound(AsyncWebServerRequest *request) {

Loading…
Cancel
Save