add header to config portal

This commit is contained in:
Yurii
2023-11-16 08:06:50 +03:00
parent 77b0859cc8
commit ce318b8cde
2 changed files with 14 additions and 1 deletions

View File

@@ -43,6 +43,18 @@ protected:
wm.setDebugOutput(settings.debug); wm.setDebugOutput(settings.debug);
//wm.setDebugOutput(settings.debug, WM_DEBUG_VERBOSE); //wm.setDebugOutput(settings.debug, WM_DEBUG_VERBOSE);
wm.setTitle("OpenTherm Gateway");
wm.setCustomMenuHTML(PSTR(
"<style>.wrap h1 {display: none;} .wrap h3 {display: none;} .nh {margin: 0 0 1em 0;} .nh .logo {font-size: 1.8em; margin: 0.5em; text-align: center;} .nh .links {text-align: center;}</style>"
"<div class=\"nh\">"
"<div class=\"logo\">OpenTherm Gateway</div>"
"<div class=\"links\"><a href=\"" OT_GATEWAY_REPO "\" target=\"_blank\">Repo</a> | <a href=\"" OT_GATEWAY_REPO "/issues\" target=\"_blank\">Issues</a> | <a href=\"" OT_GATEWAY_REPO "/releases\" target=\"_blank\">Releases</a> | <small>v" OT_GATEWAY_VERSION " (" __DATE__ ")</small></div>"
"</div>"
));
std::vector<const char *> menu = {"custom", "wifi", "param", "sep", "info", "update", "restart"};
wm.setMenu(menu);
wmHostname = new WiFiManagerParameter("hostname", "Hostname", settings.hostname, 80); wmHostname = new WiFiManagerParameter("hostname", "Hostname", settings.hostname, 80);
wm.addParameter(wmHostname); wm.addParameter(wmHostname);

View File

@@ -1,4 +1,5 @@
#define OT_GATEWAY_VERSION "1.3.3" #define OT_GATEWAY_VERSION "1.3.3"
#define OT_GATEWAY_REPO "https://github.com/Laxilef/OTGateway"
#define AP_SSID "OpenTherm Gateway" #define AP_SSID "OpenTherm Gateway"
#define AP_PASSWORD "otgateway123456" #define AP_PASSWORD "otgateway123456"
#define USE_TELNET #define USE_TELNET
@@ -55,4 +56,4 @@
#define DEBUG(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.println(__VA_ARGS__); #define DEBUG(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.println(__VA_ARGS__);
#define DEBUG_F(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.printf(__VA_ARGS__); #define DEBUG_F(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.printf(__VA_ARGS__);
char buffer[120]; char buffer[255];