mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
adds green status S, adds test back button
This commit is contained in:
@@ -1025,6 +1025,7 @@ void WiFiManager::handleWifi(boolean scan) {
|
||||
}
|
||||
page += FPSTR(HTTP_FORM_END);
|
||||
page += FPSTR(HTTP_SCAN_LINK);
|
||||
if(_showBack) page += FPSTR(HTTP_BACKBTN);
|
||||
reportStatus(page);
|
||||
page += FPSTR(HTTP_END);
|
||||
|
||||
@@ -1051,6 +1052,7 @@ void WiFiManager::handleParam(){
|
||||
|
||||
page += getParamOut();
|
||||
page += FPSTR(HTTP_FORM_END);
|
||||
if(_showBack) page += FPSTR(HTTP_BACKBTN);
|
||||
reportStatus(page);
|
||||
page += FPSTR(HTTP_END);
|
||||
|
||||
@@ -1549,6 +1551,7 @@ void WiFiManager::handleInfo() {
|
||||
}
|
||||
page += F("</dl>");
|
||||
if(_showInfoErase) page += FPSTR(HTTP_ERASEBTN);
|
||||
if(_showBack) page += FPSTR(HTTP_BACKBTN);
|
||||
page += FPSTR(HTTP_HELP);
|
||||
page += FPSTR(HTTP_END);
|
||||
|
||||
|
||||
@@ -382,6 +382,7 @@ class WiFiManager
|
||||
boolean _scanDispOptions = false; // show percentage in scans not icons
|
||||
boolean _paramsInWifi = true; // show custom parameters on wifi page
|
||||
boolean _showInfoErase = true; // info page erase button
|
||||
boolean _showBack = false; // show back button
|
||||
boolean _enableConfigPortal = true; // use config portal if autoconnect failed
|
||||
const char * _hostname = "";
|
||||
|
||||
|
||||
@@ -139,12 +139,12 @@ a:hover {
|
||||
.msg.P h4 {
|
||||
color: var(--primarycolor);
|
||||
}
|
||||
/*.msg.S {
|
||||
.msg.S {
|
||||
border-left-color: #5cb85c;
|
||||
}
|
||||
.msg.S h4 {
|
||||
color: #5cb85c;
|
||||
}*/
|
||||
}
|
||||
.msg.D {
|
||||
border-left-color: #dc3630;
|
||||
}
|
||||
@@ -201,6 +201,7 @@ input:disabled {
|
||||
<form action='/erase' method='post'><button class='D'>Erase</button></form><br/>
|
||||
<form action='/restart' method='post'><button>Restart</button></form><br/>
|
||||
<form action='/exit' method='post'><button>Exit</button></form><br/>
|
||||
<form action='/' method='post'><button>Back</button></form><br/>
|
||||
<!-- /HTTP_PORTAL_MENU -->
|
||||
<!-- SAMPLE -->
|
||||
<h2>/wifi</h2><hr>
|
||||
@@ -269,9 +270,12 @@ input:disabled {
|
||||
<div class='msg'>No AP set</div>
|
||||
<!-- /HTTP_STATUS_NONE -->
|
||||
<!-- SAMPLE -->
|
||||
<div class='msg P'><h4>H4 Color Header</h4>content</div>
|
||||
<div class='msg P'><h4>H4 Color Header P</h4>content</div>
|
||||
<!-- /SAMPLE -->
|
||||
<!-- SAMPLE -->
|
||||
<div class='msg S'><h4>H4 Color Header S</h4>content</div>
|
||||
<!-- /SAMPLE -->
|
||||
<!-- SAMPLE -->
|
||||
<h2>/info</h3><hr>
|
||||
<dl>
|
||||
<dt>Chip ID</dt><dd>123456</dd>
|
||||
|
||||
+4
-3
@@ -58,11 +58,12 @@ const char HTTP_FORM_PARAM[] PROGMEM = "<br/><input id='{i}' name='{n}' ma
|
||||
|
||||
const char HTTP_SCAN_LINK[] PROGMEM = "<br/><form action='/wifi?refresh=1' method='POST'><button name='refresh' value='1'>Refresh</button></form>";
|
||||
const char HTTP_SAVED[] PROGMEM = "<div class='msg'>Saving Credentials<br/>Trying to connect ESP to network.<br />If it fails reconnect to AP to try again</div>";
|
||||
const char HTTP_PARAMSAVED[] PROGMEM = "<div class='msg'>Saved<br/></div>";
|
||||
const char HTTP_PARAMSAVED[] PROGMEM = "<div class='msg S'>Saved<br/></div>";
|
||||
const char HTTP_END[] PROGMEM = "</div></body></html>";
|
||||
const char HTTP_ERASEBTN[] PROGMEM = "<br/><form action='/erase' method='get'><button class='D'>Erase WiFi Config</button></form>";
|
||||
const char HTTP_BACKBTN[] PROGMEM = "<hr><br/><form action='/' method='get'><button>Back</button></form>";
|
||||
|
||||
const char HTTP_STATUS_ON[] PROGMEM = "<div class='msg P'><strong>Connected</strong> to {v}<br/><em><small>with IP {i}</small></em></div>";
|
||||
const char HTTP_STATUS_ON[] PROGMEM = "<div class='msg S'><strong>Connected</strong> to {v}<br/><em><small>with IP {i}</small></em></div>";
|
||||
const char HTTP_STATUS_OFF[] PROGMEM = "<div class='msg {c}'><strong>Not Connected</strong> to {v}{r}</div>";
|
||||
const char HTTP_STATUS_OFFPW[] PROGMEM = "<br/>Authentication Failure"; // STATION_WRONG_PASSWORD, no eps32
|
||||
const char HTTP_STATUS_OFFNOAP[] PROGMEM = "<br/>AP not found"; // WL_NO_SSID_AVAIL
|
||||
@@ -86,7 +87,7 @@ const char HTTP_STYLE[] PROGMEM = "<style>"
|
||||
"background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAAgCAMAAACfM+KhAAAALVBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAOrOgAAAADnRSTlMAESIzRGZ3iJmqu8zd7gKjCLQAAACmSURBVHgB7dDBCoMwEEXRmKlVY3L//3NLhyzqIqSUggy8uxnhCR5Mo8xLt+14aZ7wwgsvvPA/ofv9+44334UXXngvb6XsFhO/VoC2RsSv9J7x8BnYLW+AjT56ud/uePMdb7IP8Bsc/e7h8Cfk912ghsNXWPpDC4hvN+D1560A1QPORyh84VKLjjdvfPFm++i9EWq0348XXnjhhT+4dIbCW+WjZim9AKk4UZMnnCEuAAAAAElFTkSuQmCC');"
|
||||
"background-size: 95px 16px;}}"
|
||||
// msg callouts
|
||||
".msg{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-left-color:#777}.msg h4{margin-top:0;margin-bottom:5px}.msg.P{border-left-color:#1fa3ec}.msg.P h4{color:#1fa3ec}.msg.D{border-left-color:#dc3630}.msg.D h4{color:#dc3630}"
|
||||
".msg{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-left-color:#777}.msg h4{margin-top:0;margin-bottom:5px}.msg.P{border-left-color:#1fa3ec}.msg.P h4{color:#1fa3ec}.msg.D{border-left-color:#dc3630}.msg.D h4{color:#dc3630}.msg.S{border-left-color: #5cb85c}.msg.S h4{color: #5cb85c}"
|
||||
// lists
|
||||
"dt{font-weight:bold}dd{margin:0;padding:0 0 0.5em 0;min-height:12px}"
|
||||
"td{vertical-align: top;}"
|
||||
|
||||
Reference in New Issue
Block a user