Compare commits
No commits in common. "3f20df75711fb8525698c3bc28c7e58d925360e3" and "3d43fa7a84805a718fb54fc573d01835cb309d36" have entirely different histories.
3f20df7571
...
3d43fa7a84
11
src/netman.h
11
src/netman.h
@ -328,6 +328,15 @@ void netman::handleRemove() {
|
||||
// Add SSID to config and save
|
||||
void netman::handleSelect() {
|
||||
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);
|
||||
}
|
@ -138,7 +138,7 @@ bool fetchPrintingStatus(Adafruit_SSD1306& display) {
|
||||
display.fillRect(0, 26, displayWidth, 11, BLACK);
|
||||
|
||||
// Check if it’s time to scroll based on the delay
|
||||
if(fileNameWidth > displayWidth) {
|
||||
if(fileNameWidth > 22) {
|
||||
if (millis() - lastScrollTime > scrollDelay) {
|
||||
// Update scroll position based on the current direction
|
||||
scrollPos += scrollDirection;
|
||||
|
Loading…
Reference in New Issue
Block a user