Skip to content

Commit

Permalink
Display hostname in header. Closes arendst#1006
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanolofsson committed Mar 6, 2018
1 parent 15886c1 commit e7437b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sonoff/webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ const char HTTP_HEAD_STYLE[] PROGMEM =
"<div style='text-align:center;color:red;'><h3>" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "</h3></div>"
#endif
#ifdef LANGUAGE_MODULE_NAME
"<div style='text-align:center;'><h3>" D_MODULE " {ha</h3><h2>{h}</h2></div>";
"<div style='text-align:center;'><h3>" D_MODULE " {ha</h3><h2>{h}</h2><h3>{hn.local ({ip)</h3></div>";
#else
"<div style='text-align:center;'><h3>{ha " D_MODULE "</h3><h2>{h}</h2></div>";
"<div style='text-align:center;'><h3>{ha " D_MODULE "</h3><h2>{h}</h2><h3>{hn.local ({ip)</h3></div>";
#endif
const char HTTP_SCRIPT_CONSOL[] PROGMEM =
"var sn=0;" // Scroll position
Expand Down Expand Up @@ -442,6 +442,8 @@ void ShowPage(String &page, bool auth)
}

page.replace(F("{ha"), my_module.name);
page.replace(F("{hn"), my_hostname);
page.replace(F("{ip"), WiFi.localIP().toString());
page.replace(F("{h}"), Settings.friendlyname[0]);
if (HTTP_MANAGER == webserver_state) {
if (WifiConfigCounter()) {
Expand Down

0 comments on commit e7437b6

Please sign in to comment.