diff --git a/html/spoolman.html b/html/spoolman.html index 0caffa4..fd3420c 100644 --- a/html/spoolman.html +++ b/html/spoolman.html @@ -95,27 +95,36 @@

Spoolman API URL / Bambu Credentials

- - - -

-

Bambu Lab Printer Credentials

-
-
- - +
+
+
Set URL/IP to your Spoolman-Instanz
+ + +

-
- - +
+ +
+
+
Bambu Lab Printer Credentials
+
+
+ + +
+
+ + +
+
+ + +
+ +

+
-
- - -
- -

diff --git a/html/style.css b/html/style.css index 16106f5..51eb00e 100644 --- a/html/style.css +++ b/html/style.css @@ -279,9 +279,10 @@ a:hover { /* Karten-Stil für optische Trennung */ .card { - background: #f9f9f9; + background: var(--primary-color); + width: 500px; padding: 15px; - margin: 20px 0; + margin: 20px auto; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } @@ -959,7 +960,6 @@ input[type="submit"]:disabled, /* Bambu Settings Erweiterung */ .bambu-settings { - background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); diff --git a/src/website.cpp b/src/website.cpp index 42f891f..9fd9d64 100644 --- a/src/website.cpp +++ b/src/website.cpp @@ -384,7 +384,8 @@ void setupWebserver(AsyncWebServer &server) { html.replace("{{spoolmanUrl}}", spoolmanUrl); JsonDocument doc; - if (loadJsonValue("/bambu_credentials.json", doc) && doc["bambu_ip"].is()) { + if (loadJsonValue("/bambu_credentials.json", doc) && doc["bambu_ip"].is()) + { String bambuIp = doc["bambu_ip"].as(); String bambuSerial = doc["bambu_serialnr"].as(); String bambuCode = doc["bambu_accesscode"].as(); @@ -395,7 +396,13 @@ void setupWebserver(AsyncWebServer &server) { html.replace("{{bambuIp}}", bambuIp ? bambuIp : ""); html.replace("{{bambuSerial}}", bambuSerial ? bambuSerial : ""); html.replace("{{bambuCode}}", bambuCode ? bambuCode : ""); - } + } + else + { + html.replace("{{bambuIp}}", ""); + html.replace("{{bambuSerial}}", ""); + html.replace("{{bambuCode}}", ""); + } request->send(200, "text/html", html); });