diff --git a/Arduino/CanGrow/include/CanGrow_Webserver.h b/Arduino/CanGrow/include/CanGrow_Webserver.h
index 3213e39..59cc5f8 100644
--- a/Arduino/CanGrow/include/CanGrow_Webserver.h
+++ b/Arduino/CanGrow/include/CanGrow_Webserver.h
@@ -31,6 +31,7 @@
* include static files files
*/
#include "Webserver/File_cangrow_CSS.h"
+#include "Webserver/File_favicon_ico.h"
/*
* include webpages header files
@@ -85,6 +86,8 @@ void Webserver_Init() {
/* url handler definition */
webserver.on("/", HTTP_GET, WebPage_root);
webserver.on("/cangrow.css", HTTP_GET, WebFile_cangrow_CSS);
+ webserver.on("/favicon.ico", HTTP_GET, WebFile_favicon_ico);
+
webserver.on("/wifi/", HTTP_GET, WebPage_wifi);
webserver.on("/wifi/", HTTP_POST, WebPage_wifi);
webserver.on("/system/", HTTP_GET, WebPage_system);
@@ -99,8 +102,11 @@ void Webserver_Init() {
webserver.on("/system/wipe", HTTP_GET, WebPage_system_wipe);
webserver.on("/system/wipe", HTTP_POST, WebPage_system_wipe);
- webserver.on("/system/output", HTTP_GET, WebPage_system_output);
- webserver.on("/system/output", HTTP_POST, WebPage_system_output);
+ webserver.on("/system/output/", HTTP_GET, WebPage_system_output);
+ webserver.on("/system/output/", HTTP_POST, WebPage_system_output);
+
+ webserver.on("/system/output/add", HTTP_GET, WebPage_system_output_add);
+ webserver.on("/system/output/add", HTTP_POST, WebPage_system_output_add);
requestLogger.setOutput(Serial);
// this activates the middleware
diff --git a/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h b/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h
index 7355efe..f61e4a6 100644
--- a/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h
+++ b/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h
@@ -41,7 +41,7 @@ const char* File_cangrow_CSS PROGMEM = R"(body {
}
.center {
- width: 100%%;
+ /*width: 100; */
margin: auto;
}
@@ -104,7 +104,7 @@ a:active {
}
.nav {
background: #333;
- /*width: 100%%; */
+ /*width: 100; */
margin: auto;
margin-bottom: 10px;
padding: 0;
@@ -207,7 +207,7 @@ input[type=text], input[type=date], input[type=number], input[type=password], se
@media only screen and (min-width: 1820px) {
/*.center, .nav {
- width: 60%%; min-width: 420px;
+ width: 60; min-width: 420px;
}*/
.subnav li {
display: '';
diff --git a/Arduino/CanGrow/include/Webserver/Header.h b/Arduino/CanGrow/include/Webserver/Header.h
index 8b39888..8cbfdd9 100644
--- a/Arduino/CanGrow/include/Webserver/Header.h
+++ b/Arduino/CanGrow/include/Webserver/Header.h
@@ -33,10 +33,7 @@ const char* Header_HTML PROGMEM = R"(
%GROWNAME% - CanGrow v%CGVER%
-
-
+
- 🌱 %GROWNAME%
diff --git a/Arduino/CanGrow/include/Webserver/Page_system.h b/Arduino/CanGrow/include/Webserver/Page_system.h
index 1cdaa63..0fd3cf1 100644
--- a/Arduino/CanGrow/include/Webserver/Page_system.h
+++ b/Arduino/CanGrow/include/Webserver/Page_system.h
@@ -292,6 +292,10 @@ void WebPage_system_wipe(AsyncWebServerRequest *request) {
* Subpage output
*/
String Proc_WebPage_system_output(const String& var) {
+ #ifndef DEBUG
+ Serial.print("DB [Webserver:system:output(Proc)] var: ");
+ Serial.println(var);
+ #endif
if(TestHeaderFooter(var)) {
return AddHeaderFooter(var, 2);
} else if(Test_WebPage_system_SUBNAV(var)) {
@@ -321,3 +325,39 @@ void WebPage_system_output(AsyncWebServerRequest *request) {
}
+/*
+ * Subpage output add
+ */
+String Proc_WebPage_system_output_add(const String& var) {
+ #ifndef DEBUG
+ Serial.print("DB [Webserver:system:output:add(Proc)] var: ");
+ Serial.println(var);
+ #endif
+ if(TestHeaderFooter(var)) {
+ return AddHeaderFooter(var, 2);
+ } else if(Test_WebPage_system_SUBNAV(var)) {
+ return Proc_WebPage_system_SUBNAV(var, 1);
+ } else{
+ return String();
+ }
+}
+
+String Proc_WebPage_system_output_add_POST(const String& var) {
+ if(var == "SAVE_MSG") {
+ return String(Common_HTML_SAVE_MSG);
+ } else {
+ return Proc_WebPage_system_output_add(var);
+ }
+}
+
+void WebPage_system_output_add(AsyncWebServerRequest *request) {
+ if(request->method() == HTTP_POST) {
+ request->send_P(200, "text/html", Page_system_output_add_HTML, Proc_WebPage_system_output_add_POST);
+ Serial.println(":: [Webserver:system:output:add] [POST] hello");
+
+
+ } else {
+ request->send_P(200, "text/html", Page_system_output_add_HTML, Proc_WebPage_system_output_add);
+ }
+
+}
diff --git a/Arduino/CanGrow/include/Webserver/Page_system_HTML.h b/Arduino/CanGrow/include/Webserver/Page_system_HTML.h
index 8352926..f806c5b 100644
--- a/Arduino/CanGrow/include/Webserver/Page_system_HTML.h
+++ b/Arduino/CanGrow/include/Webserver/Page_system_HTML.h
@@ -54,7 +54,7 @@ const char* Page_system_HTML PROGMEM = R"(%HEADER%
%FOOTER%)";
const char* Page_system_HTML_SUBNAV PROGMEM = R"(
- - ⚡ Output configuration
+ - ⚡ Output configuration
- 🔄 Firmware update
- 🔁 CanGrow restart
- 💣 Factory reset
@@ -115,8 +115,6 @@ const char* Page_system_restart_HTML_RESTART_MSG_POST PROGMEM = R"(Restarting...
* Subpage wipe
*/
const char* Page_system_wipe_HTML PROGMEM = R"(%HEADER%
-
-
%SUBNAV%
%WIPE_MSG%
@@ -138,7 +136,14 @@ const char* Page_system_wipe_HTML_WIPE_MSG_POST PROGMEM = R"(Restarting...)";
* Subpage output
*/
const char* Page_system_output_HTML PROGMEM = R"(%HEADER%
-
%SUBNAV%
-
+
➕ Add output
+%FOOTER%)";
+
+/*
+ * Subpage output add
+ */
+const char* Page_system_output_add_HTML PROGMEM = R"(%HEADER%
+%SUBNAV%
+
➕ Add output
%FOOTER%)";