1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-03-14 18:54:57 +00:00

Compare commits

..

No commits in common. "master" and "2.2.4" have entirely different histories.

2 changed files with 4 additions and 3 deletions

View File

@ -660,7 +660,7 @@ uint16_t ESPUIClass::gauge(const char* label, ControlColor color, int number, in
uint16_t ESPUIClass::separator(const char* label) uint16_t ESPUIClass::separator(const char* label)
{ {
return addControl(ControlType::Separator, label, "", ControlColor::Alizarin); return addControl(ControlType::Separator, label, "", ControlColor::Alizarin, Control::noParent, nullptr);
} }
uint16_t ESPUIClass::fileDisplay(const char* label, ControlColor color, String filename) uint16_t ESPUIClass::fileDisplay(const char* label, ControlColor color, String filename)
@ -1264,6 +1264,7 @@ void ESPUIClass::begin(const char* _title, const char* username, const char* pas
responseText += ("</body></html><head><meta http-equiv=\"Refresh\" content=\"0; URL='http://" + WiFi.softAPIP().toString() + "'\" /></head>"); responseText += ("</body></html><head><meta http-equiv=\"Refresh\" content=\"0; URL='http://" + WiFi.softAPIP().toString() + "'\" /></head>");
response->write(responseText.c_str(), responseText.length()); response->write(responseText.c_str(), responseText.length());
request->send(response); request->send(response);
request->redirect("/");
} }
else else
{ {

View File

@ -310,14 +310,14 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
break; break;
} }
if(!FragmentRequest["id"].is<JsonVariant>()) if(!FragmentRequest.containsKey(F("id")))
{ {
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID")); Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID"));
break; break;
} }
uint16_t ControlId = uint16_t(FragmentRequest[F("id")]); uint16_t ControlId = uint16_t(FragmentRequest[F("id")]);
if(!FragmentRequest["offset"].is<JsonVariant>()) if(!FragmentRequest.containsKey(F("offset")))
{ {
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset")); Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset"));
break; break;