Skip to content

Commit

Permalink
setup form tweaks; use lock emoji for ssids
Browse files Browse the repository at this point in the history
  • Loading branch information
tcsullivan committed Oct 19, 2024
1 parent d1d0fb5 commit 7c633f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions noisemeter-device/access-point-html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ font-size: 24px;
padding: 5px;
margin-top: 3px;
}
select, input{margin-bottom: 1em;min-width: 150px;}
.meter {
height: 5px;
position: relative;
Expand Down Expand Up @@ -75,16 +76,16 @@ const char *HTML_FOOTER = R"html(
const char *HTML_BODY_FORM_HEADER = R"html(
<p>Enter the wifi network name and password for your home network, which the sensor can connect to to get online:<br/><br/></p>
<form method='POST' action='/submit' enctype='multipart/form-data'>
<p>Wifi network name: (* = password required)</p>
<select name='ssid' required>
<label for='ssid'>Wifi network name (&#x1f512; = password required):</label><br>
<select name='ssid' id='ssid' required>
)html";

const char *HTML_BODY_FORM_FOOTER = R"html(
</select>
<p>Wifi network password:</p>
<input type='password' name='psk'/>
<p>Your Email (also your username for logging into the tRacket portal):</p>
<input type='email' name='email'/>
</select><br>
<label for='psk'>Wifi network password:</label><br>
<input type='password' name='psk' id='psk'/><br>
<label for='email'>Your Email (also your username for logging into the tRacket portal):</label><br>
<input type='email' name='email' id='email'/><br>
<p><input type='submit' value='Connect'/></p>
</form>
)html";
Expand Down
4 changes: 2 additions & 2 deletions noisemeter-device/access-point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ bool AccessPoint::handle(WebServer& server, HTTPMethod method, String uri)
response += ssid;
response += "\">";
response += ssid;
if (auto ty = WiFi.encryptionType(i); ty != WIFI_AUTH_OPEN)
response += " *";
if (WiFi.encryptionType(i) != WIFI_AUTH_OPEN)
response += " &#x1f512;";
response += "</option>";
}

Expand Down

0 comments on commit 7c633f7

Please sign in to comment.