diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index bb3e977..1329d86 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -1077,7 +1077,8 @@ void WebCfgServer::update() void WebCfgServer::buildHtml(String& response) { - buildHtmlHeader(response); + String header = ""; // auto refresh page + buildHtmlHeader(response, header); response.concat("

Info

\n"); response.concat(""); @@ -2024,10 +2025,12 @@ void WebCfgServer::processFactoryReset() restartEsp(RestartReason::NukiHubReset); } -void WebCfgServer::buildHtmlHeader(String &response) +void WebCfgServer::buildHtmlHeader(String &response, String additionalHeader) { response.concat(""); response.concat(""); + if(strcmp(additionalHeader.c_str(), "") != 0) + response.concat(additionalHeader); // response.concat(""); diff --git a/src/WebCfgServer.h b/src/WebCfgServer.h index 502cda5..0567591 100644 --- a/src/WebCfgServer.h +++ b/src/WebCfgServer.h @@ -53,7 +53,7 @@ private: void processUnpair(bool opener); void processFactoryReset(); - void buildHtmlHeader(String& response); + void buildHtmlHeader(String& response, String additionalHeader = ""); void printInputField(String& response, const char* token, const char* description, const char* value, const size_t& maxLength, const bool& isPassword = false, const bool& showLengthRestriction = false); void printInputField(String& response, const char* token, const char* description, const int value, size_t maxLength); void printCheckBox(String& response, const char* token, const char* description, const bool value, const char* htmlClass); @@ -92,4 +92,4 @@ private: String _confirmCode = "----"; bool _enabled = true; -}; \ No newline at end of file +};