Update switch styling and adjust hostname parameter initialization

This commit is contained in:
2026-06-23 23:42:01 +02:00
parent a3c7d9aa28
commit a08cc5e779
+5 -4
View File
@@ -477,10 +477,10 @@ static void handleRoot() {
html += ".count-row label{margin-bottom:4px}";
html += ".btn{width:100%;margin-top:8px;padding:12px;background:#4361ee;color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}";
html += ".btn:hover{background:#3651d4}.mac{font-size:12px;color:#999;text-align:center;margin-top:20px}";
html += ".tgl-lbl{margin-bottom:0!important;line-height:20px}.switch{position:relative;display:inline-block;width:36px;height:20px;margin-left:auto;flex-shrink:0}";
html += ".switch input{opacity:0;width:0;height:0}.slid{position:absolute;cursor:pointer;inset:0;background:#ccc;border-radius:20px;transition:.3s}";
html += ".slid::before{content:\"\";position:absolute;height:16px;width:16px;left:2px;bottom:2px;background:#fff;border-radius:50%;transition:.3s}";
html += ".switch input:checked+.slid{background:#4361ee}.switch input:checked+.slid::before{transform:translateX(16px)}";
html += ".tgl-lbl{margin-bottom:0!important;line-height:18px}.switch{position:relative;display:inline-block;width:32px;height:18px;margin-left:auto;flex-shrink:0}";
html += ".switch input{opacity:0;width:0;height:0}.slid{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;border-radius:18px;transition:.3s}";
html += ".slid::before{content:\"\";position:absolute;height:14px;width:14px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.3s;box-shadow:0 1px 3px rgba(0,0,0,.2)}";
html += ".switch input:checked+.slid{background:#4361ee}.switch input:checked+.slid::before{transform:translateX(14px)}";
html += "</style></head><body><div class=card>";
html += "<h1>M1730</h1><div class=sub>Configuration</div><div class=info>";
html += "<div><span>Hostname</span><span>" + String(hostname) + "</span></div>";
@@ -622,6 +622,7 @@ void setup() {
LittleFS.begin(true);
loadConfig();
hostnameParam.setValue(hostname, strlen(hostname));
attachMeters();
applyMeters();