Quellcode durchsuchen

connection success page as styled page in HtmlPage.h

master
gituser vor 1 Woche
Ursprung
Commit
7da3ffa013
3 geänderte Dateien mit 110 neuen und 4 gelöschten Zeilen
  1. 106
    0
      HtmlPages.h
  2. 3
    3
      LEDLamp.ino
  3. 1
    1
      sloeber.ino.cpp

+ 106
- 0
HtmlPages.h Datei anzeigen

@@ -439,4 +439,110 @@ const String getSTAControlPage(String macAddress) {
}


const String getConnectionSuccessPage() {
String html =
R"rawliteral(
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wemos LEDLamp Setup</title>

<style>
body {
margin: 0;
font-family: Arial, sans-serif;
background: linear-gradient(135deg, #1e1e2f, #2b5876);
color: white;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
* {
box-sizing: border-box;
}
.card {
background: rgba(255,255,255,0.08);
backdrop-filter: blur(10px);
padding: 25px;
border-radius: 16px;
width: 90%;
max-width: 360px;
box-shadow: 0 8px 20px rgba(0,0,0,0.3);
animation: fadeIn 0.8s ease;
}
h2 {
margin-top: 0;
text-align: center;
}
.info {
font-size: 12px;
opacity: 0.8;
margin-top: 8px;
margin-bottom: 15px;
text-align: center;
}
.bar_white {
background: white;
width: 100%;
height: 3px;
margin-bottom: 20px;
}
.bar_red {
background: red;
width: 100%;
height: 3px;
margin-bottom: 20px;
}

.bar_green {
background: green;
width: 100%;
height: 3px;
margin-bottom: 20px;
}

.bar_blue {
background: blue;
width: 100%;
height: 3px;
margin-bottom: 20px;
}

@keyframes fadeIn {
from {opacity: 0; transform: translateY(10px);}
to {opacity: 1; transform: translateY(0);}
}
</style>
</head>

<body>
<div class="card">
<div style="display: flex">
<div class="bar_green"></div>
<div class="bar_white"></div>
<div class="bar_red"></div>
<div class="bar_blue"></div>
</div>
<h2>Wemos LEDLamp Setup gespeichert!</h2>
<div class="info">Wemos startet neu...</div>
</div>
</body>
</html>
)rawliteral";

return html;
}



#endif /* HTMLPAGES_H_ */

+ 3
- 3
LEDLamp.ino Datei anzeigen

@@ -69,7 +69,7 @@ void handleSave() {

saveConfig();

webServer.send(200, "text/html", "<h2>Gespeichert!</h2><p>Wemos startet neu...</p>");
webServer.send(200, "text/html", getConnectionSuccessPage());

delay(1500);
ESP.restart();
@@ -83,6 +83,7 @@ void handleNotFound() {

// ---------- START ACCESS POINT ----------
void startAP() {

WiFi.mode(WIFI_AP);

WiFi.softAP(ap_ssid, ap_pass);
@@ -215,8 +216,7 @@ void handleError() {
digitalWrite(ledPin, LOW);
}

void startSTAWebServer()
{
void startSTAWebServer() {
Serial.println("Starte STA Services");

// Webseite

+ 1
- 1
sloeber.ino.cpp Datei anzeigen

@@ -2,7 +2,7 @@
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2026-06-08 21:47:53
//This file has been generated on 2026-06-09 21:27:43

#include "Arduino.h"
#include "Arduino.h"

Laden…
Abbrechen
Speichern