diff --git a/Arduino/CanGrow/include/CanGrow.h b/Arduino/CanGrow/include/CanGrow.h index 9933a4e..ea9e333 100644 --- a/Arduino/CanGrow/include/CanGrow.h +++ b/Arduino/CanGrow/include/CanGrow.h @@ -63,8 +63,6 @@ * 5 - NO_PWM: No PWM output * 6 - PWM_BOOT: PWM at boot time */ -const byte GPIO_Index_len = 6; - const byte BOOTFAILS_LOW = 1; const byte BOOTFAILS_HIGH = 2; const byte FLASHMODE_LOW = 3; @@ -72,7 +70,6 @@ const byte INPUT_ONLY = 4; const byte NO_PWM = 5; const byte HIGH_BOOT = 6; - char BOOTFAILS_LOW_descr[] = "BF_LOW"; char BOOTFAILS_HIGH_descr[] = "BF_HIGH"; char FLASMODE_LOW_descr[] = "FM_LOW"; diff --git a/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h b/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h index ef01dbf..358200c 100644 --- a/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h +++ b/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h @@ -52,8 +52,12 @@ function showSelect(selectId, prefix, hideClass = '') { if(hideClass != '') { hideAllClass(hideClass); } + let selVal = document.getElementById(selectId).value; - toggleDisplay(prefix + selVal); + toggleId = prefix + selVal; + if(document.getElementById(toggleId) !== null ) { + toggleDisplay(toggleId); + } })"; void WebFile_cangrow_JS(AsyncWebServerRequest *request) { diff --git a/Arduino/CanGrow/include/Webserver/Page_wifi_HTML.h b/Arduino/CanGrow/include/Webserver/Page_wifi_HTML.h index 9940d21..07de781 100644 --- a/Arduino/CanGrow/include/Webserver/Page_wifi_HTML.h +++ b/Arduino/CanGrow/include/Webserver/Page_wifi_HTML.h @@ -47,37 +47,38 @@ const char* Page_wifi_HTML PROGMEM = R"(%HEADER%
DHCP:
-
-IP:
- . - . - . -
- -Netmask:
- . - . - . -
- -Gateway:
- . - . - . -
- -DNS:
- . - . - . -
- - + +
%FOOTER%)"; diff --git a/playground/html/root/cangrow.css b/playground/html/root/cangrow.css index 8be9236..60883fe 100644 --- a/playground/html/root/cangrow.css +++ b/playground/html/root/cangrow.css @@ -7,7 +7,6 @@ body { .footer { color: #343B35; - /*text-align: center;*/ } .center { @@ -16,19 +15,10 @@ body { } .centered { - /*display: block;*/ margin-left: auto; margin-right: auto; } -td { - text-align: left; - vertical-align: middle; -} -/*h1, h2, h3, h4, h5 { - text-align: center; -}*/ - h1 { margin: 15px; } @@ -41,6 +31,11 @@ h3 { margin: 5px; } +td { + text-align: left; + vertical-align: middle; +} + a:link, a:visited { color: #04AA6D; } @@ -179,6 +174,10 @@ input[type=text], input[type=date], input[type=number], input[type=password], se border-radius: 3px; } +.hidden { + display: none; +} + @media only screen and (min-width: 1820px) { /*.center, .nav { width: 60; min-width: 420px; @@ -191,4 +190,4 @@ input[type=text], input[type=date], input[type=number], input[type=password], se /*@media only screen and (min-width: 640px) { -}*/ +}*/ \ No newline at end of file diff --git a/playground/html/root/index.html b/playground/html/root/index.html index 03dd7be..5ffdcdc 100644 --- a/playground/html/root/index.html +++ b/playground/html/root/index.html @@ -5,142 +5,76 @@ CanGrow - CanGrow v0.2-dev - - +
- -

➕ Add output

+Current Settings:
WiFi SSID: Gefahrenzone
+Use DHCP: 1
+IP address: 192.168.30.220
+Subnet mask: 255.255.255.0
+Gateway: 192.168.30.1
+DNS: 192.168.30.1

+

Select your wifi network from the SSID list. +
Reload the page, if your network is not listed.

+
-

Add a new output to CanGrow.

- +SSID:
+ - - - -
-Device:
-
+ +DHCP:
+
-Name:
-
- -Enable:
-
- - -
- GPIO:
-
+ - - -
-I2C:
-
-
- -
- Host:
-
+ Netmask:
+ . + . + . +
- URI on:
-
+ Gateway:
+ . + . + . +
- URI off:
-
+ DNS:
+ . + . + . +
-
- - - - - - - - +