Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Reworked webinterface. fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinschumacher committed Jan 17, 2018
1 parent 363261f commit 1973cd8
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 156 deletions.
5 changes: 3 additions & 2 deletions Basecamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ bool Basecamp::begin() {
#ifndef BASECAMP_NOWEB
web.begin(configuration);

//if (configuration.get("WifiConfigured")) {
web.addInterfaceElement("heading", "h1", configuration.get("DeviceName"),"#wrapper");
web.setInterfaceElementAttribute("heading", "class", "fat-border");

Expand All @@ -88,6 +87,9 @@ bool Basecamp::begin() {
web.addInterfaceElement("WifiEssid", "input", "WIFI SSID:","#configform" , "WifiEssid");
web.addInterfaceElement("WifiPassword", "input", "WIFI Password:", "#configform", "WifiPassword");
web.setInterfaceElementAttribute("WifiPassword", "type", "password");
web.addInterfaceElement("WifiConfigured", "input", "", "#configform", "WifiConfigured");
web.setInterfaceElementAttribute("WifiConfigured", "type", "hidden");
web.setInterfaceElementAttribute("WifiConfigured", "value", "true");
if (configuration.get("MQTTActive") != "false") {
web.addInterfaceElement("MQTTHost", "input", "MQTT Host:","#configform" , "MQTTHost");
web.addInterfaceElement("MQTTPort", "input", "MQTT Port:","#configform" , "MQTTPort");
Expand All @@ -103,7 +105,6 @@ bool Basecamp::begin() {

String infotext2 = "This device has the MAC-Address: " + mac;
web.addInterfaceElement("infotext2", "p", infotext2,"#wrapper");
//}
#endif

Serial.println(showSystemInfo());
Expand Down
Loading

0 comments on commit 1973cd8

Please sign in to comment.