mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 05:06:44 +00:00
Allow startDim 0-255 and startPage 1-12
This commit is contained in:
parent
8022b03ae6
commit
e83d6c6ba6
@ -30,6 +30,7 @@
|
|||||||
// #include "user_config_override.h"
|
// #include "user_config_override.h"
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
//default theme
|
//default theme
|
||||||
#ifndef D_HTTP_COLOR_TEXT
|
#ifndef D_HTTP_COLOR_TEXT
|
||||||
#define D_HTTP_COLOR_TEXT "#000" // Global text color - Black
|
#define D_HTTP_COLOR_TEXT "#000" // Global text color - Black
|
||||||
@ -55,6 +56,7 @@
|
|||||||
#ifndef D_HTTP_COLOR_BUTTON_RESET
|
#ifndef D_HTTP_COLOR_BUTTON_RESET
|
||||||
#define D_HTTP_COLOR_BUTTON_RESET "#f00" // Restart/Reset button color - red
|
#define D_HTTP_COLOR_BUTTON_RESET "#f00" // Restart/Reset button color - red
|
||||||
#endif
|
#endif
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
||||||
File fsUploadFile;
|
File fsUploadFile;
|
||||||
@ -119,8 +121,10 @@ const char HTTP_STYLE[] PROGMEM =
|
|||||||
"select{background-color:" D_HTTP_COLOR_INPUT ";color:" D_HTTP_COLOR_INPUT_TEXT ";}"
|
"select{background-color:" D_HTTP_COLOR_INPUT ";color:" D_HTTP_COLOR_INPUT_TEXT ";}"
|
||||||
"input:invalid{border:1px solid " D_HTTP_COLOR_INPUT_WARNING ";}"
|
"input:invalid{border:1px solid " D_HTTP_COLOR_INPUT_WARNING ";}"
|
||||||
//"#hue{width:100%;}"
|
//"#hue{width:100%;}"
|
||||||
"body{font-family:verdana;width:60%;margin:auto;background:" D_HTTP_COLOR_BACKGROUND ";color:" D_HTTP_COLOR_TEXT ";}"
|
"body{font-family:verdana;width:60%;margin:auto;background:" D_HTTP_COLOR_BACKGROUND ";color:" D_HTTP_COLOR_TEXT
|
||||||
"button{border:0;border-radius:0.6rem;background-color:" D_HTTP_COLOR_BUTTON ";color:" D_HTTP_COLOR_BUTTON_TEXT ";line-height:2.4rem;font-size:1.2rem;"
|
";}"
|
||||||
|
"button{border:0;border-radius:0.6rem;background-color:" D_HTTP_COLOR_BUTTON ";color:" D_HTTP_COLOR_BUTTON_TEXT
|
||||||
|
";line-height:2.4rem;font-size:1.2rem;"
|
||||||
"width:100%;}"
|
"width:100%;}"
|
||||||
//".q{float:right;width:64px;text-align:right;}"
|
//".q{float:right;width:64px;text-align:right;}"
|
||||||
".red{background-color:" D_HTTP_COLOR_BUTTON_RESET ";}"
|
".red{background-color:" D_HTTP_COLOR_BUTTON_RESET ";}"
|
||||||
@ -1757,11 +1761,11 @@ void webHandleHaspConfig()
|
|||||||
|
|
||||||
httpMessage += settings[FPSTR(FP_CONFIG_PAGES)].as<String>();
|
httpMessage += settings[FPSTR(FP_CONFIG_PAGES)].as<String>();
|
||||||
httpMessage += F("'></br><b>Startup Page</b> <i><small>(required)</small></i><input id='startpage' required "
|
httpMessage += F("'></br><b>Startup Page</b> <i><small>(required)</small></i><input id='startpage' required "
|
||||||
"name='startpage' type='number' min='1' max='4' value='");
|
"name='startpage' type='number' min='1' max='12' value='");
|
||||||
httpMessage += settings[FPSTR(FP_CONFIG_STARTPAGE)].as<String>();
|
httpMessage += settings[FPSTR(FP_CONFIG_STARTPAGE)].as<String>();
|
||||||
httpMessage +=
|
httpMessage +=
|
||||||
F("'></p><p><b>Startup Brightness</b> <i><small>(required)</small></i><input id='startpage' required "
|
F("'></p><p><b>Startup Brightness</b> <i><small>(required)</small></i><input id='startpage' required "
|
||||||
"name='startdim' type='number' min='0' max='100' value='");
|
"name='startdim' type='number' min='0' max='255' value='");
|
||||||
httpMessage += settings[FPSTR(FP_CONFIG_STARTDIM)].as<String>();
|
httpMessage += settings[FPSTR(FP_CONFIG_STARTDIM)].as<String>();
|
||||||
httpMessage += F("'></p>");
|
httpMessage += F("'></p>");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user