diff --git a/tools/cdata.js b/tools/cdata.js index 71fafdcb..5c9e74df 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -365,6 +365,12 @@ writeChunks( /function GetV().*\<\/script\>/gms, "" ) + }, + { + file: "settings_pin.htm", + name: "PAGE_settings_pin", + method: "gzip", + filter: "html-minify" } ], "wled00/html_settings.h" diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 8ca08d81..c2dbe91f 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -864,6 +864,9 @@ bool deserializeConfigSec() { getStringFromJson(hueApiKey, interfaces["hue"][F("key")], 47); #endif + getStringFromJson(settingsPIN, doc["pin"], 5); + correctPIN = !strlen(settingsPIN); + JsonObject ota = doc["ota"]; getStringFromJson(otaPass, ota[F("pwd")], 33); CJSON(otaLock, ota[F("lock")]); @@ -903,6 +906,8 @@ void serializeConfigSec() { if_hue[F("key")] = hueApiKey; #endif + doc["pin"] = settingsPIN; + JsonObject ota = doc.createNestedObject("ota"); ota[F("pwd")] = otaPass; ota[F("lock")] = otaLock; diff --git a/wled00/data/msg.htm b/wled00/data/msg.htm index e25aeda0..bb598338 100644 --- a/wled00/data/msg.htm +++ b/wled00/data/msg.htm @@ -4,27 +4,13 @@
diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index 26ba161c..f3004bf0 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -320,6 +320,7 @@ void updateBaudRate(uint32_t rate); //wled_server.cpp bool isIp(String str); +void createEditHandler(bool enable); bool captivePortal(AsyncWebServerRequest *request); void initServer(); void serveIndexOrWelcome(AsyncWebServerRequest *request); diff --git a/wled00/html_other.h b/wled00/html_other.h index acc1458d..406335d5 100644 --- a/wled00/html_other.h +++ b/wled00/html_other.h @@ -21,9 +21,7 @@ const uint8_t PAGE_usermod[] PROGMEM = { const char PAGE_msg[] PROGMEM = R"=====(