added web ui accent color to the global configuration
This commit is contained in:
parent
a856034f1d
commit
ab665c8e8a
8
Kconfig
8
Kconfig
|
|
@ -54,6 +54,14 @@ menu "WebGUIApp"
|
|||
default n
|
||||
help
|
||||
This will reset to default settings on every startup
|
||||
|
||||
menu "Web UI settings"
|
||||
config WEBGUIAPP_ACCENT_COLOR
|
||||
string "Accent color code for web ui"
|
||||
default "#dba617"
|
||||
help
|
||||
Set accent color for user web ui
|
||||
endmenu
|
||||
|
||||
menu "OTA settings"
|
||||
config WEBGUIAPP_OTA_AUTOUPDATE_ENABLE
|
||||
|
|
|
|||
|
|
@ -116,6 +116,12 @@ static void PrintCheckbox(char *VarData, void *arg, bool checked)
|
|||
snprintf(VarData, MAX_DYNVAR_LENGTH, " ");
|
||||
}
|
||||
|
||||
static void HTTPPrint_actclr(char *VarData, void *arg)
|
||||
{
|
||||
snprintf(VarData, MAX_DYNVAR_LENGTH, "%s", CONFIG_WEBGUIAPP_ACCENT_COLOR);
|
||||
}
|
||||
|
||||
|
||||
static void HTTPPrint_name(char *VarData, void *arg)
|
||||
{
|
||||
snprintf(VarData, MAX_DYNVAR_LENGTH, "%s", CONFIG_DEVICE_MODEL_NAME);
|
||||
|
|
@ -713,7 +719,10 @@ static void HTTPPrint_DEF(char *VarData, void *arg)
|
|||
}
|
||||
|
||||
dyn_var_handler_t HANDLERS_ARRAY[] = {
|
||||
/*Ststem settings*/
|
||||
/*GUI settings*/
|
||||
{ "actclr", sizeof("actclr") - 1, &HTTPPrint_actclr },
|
||||
|
||||
/*System settings*/
|
||||
{ "name", sizeof("name") - 1, &HTTPPrint_name },
|
||||
{ "dname", sizeof("dname") - 1, &HTTPPrint_dname },
|
||||
{ "login", sizeof("login") - 1, &HTTPPrint_login },
|
||||
|
|
|
|||
|
|
@ -355,7 +355,10 @@ static esp_err_t GETHandler(httpd_req_t *req)
|
|||
}
|
||||
|
||||
//check if the file can contains dynamic variables
|
||||
if (IS_FILE_EXT(filename, ".html") || IS_FILE_EXT(filename, ".json") || IS_FILE_EXT(filename, ".js"))
|
||||
if (IS_FILE_EXT(filename, ".html") ||
|
||||
IS_FILE_EXT(filename, ".json") ||
|
||||
IS_FILE_EXT(filename, ".css") ||
|
||||
IS_FILE_EXT(filename, ".js"))
|
||||
isDynamicVars = true;
|
||||
do
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user