mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-23 11:17:11 +02:00
0.8.71
* fix autologin bug if no password is set * translated `/serial`
This commit is contained in:
parent
d9696dc704
commit
80d07ae6fe
6 changed files with 41 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -39,7 +39,7 @@ class Protection {
|
|||
// auto logout
|
||||
if(0 != mLogoutTimeout) {
|
||||
if (0 == --mLogoutTimeout) {
|
||||
if(mPwd[0] == '\0')
|
||||
if(mPwd[0] != '\0')
|
||||
mProtected = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue