feature/netman #1
11
src/netman.h
11
src/netman.h
@ -328,15 +328,6 @@ void netman::handleRemove() {
|
|||||||
// Add SSID to config and save
|
// Add SSID to config and save
|
||||||
void netman::handleSelect() {
|
void netman::handleSelect() {
|
||||||
String ssid = server->arg("ssid");
|
String ssid = server->arg("ssid");
|
||||||
|
String selectPage = "<!DOCTYPE html><html lang='en'><head><meta charset='UTF-8'><meta name='viewport' content='width=device-width, initial-scale=1.0'><title>Connect to " + ssid + "</title><style>body{font-family:Arial,sans-serif;background-color:#f4f4f9;color:#333;display:flex;align-items:center;justify-content:center;height:100vh;margin:0}.container{width:100%;max-width:300px;padding:20px;background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,0.2);box-sizing:border-box}h2{margin-top:0;text-align:center;color:#0073e6}label{display:block;margin-bottom:5px;font-weight:bold}input[type='password']{width:100%;padding:8px;margin-bottom:15px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}button{width:100%;padding:10px;background-color:#0073e6;color:white;border:none;border-radius:4px;cursor:pointer;font-size:16px}button:hover{background-color:#005bb5}</style></head><body><div class='container'><h2>Connect to " + ssid + "</h2><form action='/add' method='get'><input type='hidden' name='ssid' value='" + ssid + "'><label for='pass'>Password:</label><input id='pass' type='password' name='pass' placeholder='Enter Password'><button type='submit'>Connect</button></form></div></body></html>";
|
||||||
// Display prompt for password if network is secured
|
|
||||||
String selectPage = "<!DOCTYPE html><html lang='en'><head><title>Connect to " + ssid + "</title></head><body>";
|
|
||||||
selectPage += "<h2>Connect to " + ssid + "</h2>";
|
|
||||||
selectPage += "<form action='/add' method='get'>";
|
|
||||||
selectPage += "<input type='hidden' name='ssid' value='" + ssid + "'>";
|
|
||||||
selectPage += "<label>Password:</label><input type='password' name='pass'><br><br>";
|
|
||||||
selectPage += "<button type='submit'>Connect</button>";
|
|
||||||
selectPage += "</form></body></html>";
|
|
||||||
|
|
||||||
server->send(200, "text/html", selectPage);
|
server->send(200, "text/html", selectPage);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user