STYLE+FIX: power.html Redesign + Auth wiederhergestellt

- power.html komplett neu gestaltet im Design-System von index.html
  (CSS-Variablen, gleiche Typografie, Farben, Abstände)
- Status-Banner, Card-Layout, Toggle-Styles, Buttons alle einheitlich
- fetch('/api/power') mit credentials:'include' für Browser-Auth
- fetch('/api/wake') mit credentials:'include' + Fehlerbehandlung
- Auth auf /api/power wieder aktiviert (POST-Schutz) mit
  credentials:'include' Browser-Auth
This commit is contained in:
ki
2026-08-31 03:20:08 +04:00
parent aeaf8fdb8b
commit 21b4128f19
2 changed files with 228 additions and 142 deletions
+3 -2
View File
@@ -753,8 +753,9 @@ def power_settings():
@app.route("/api/power", methods=["GET"])
def api_power():
"""JSON-Status fuer Live-Anzeige in der UI (GET ohne Auth)."""
# GET = nur Lesen, keine Aenderung -> kein Auth noetig
"""JSON-Status fuer Live-Anzeige in der UI."""
a = require_auth()
if a: return a
cfg = dashboard_mod.load_config()
power = cfg.get("power", {})
from datetime import datetime, timedelta