Fix export config and web status page

This commit is contained in:
2026-03-08 07:43:40 +01:00
parent 99668574b3
commit 76acbe079e
3 changed files with 6 additions and 2 deletions

View File

@@ -271,7 +271,7 @@ void webserver_init() {
doc["salt"] = salt;
// security warnings
doc["warnAdminPass"] = config.getString("AdminPassword") == ADMIN_PASS ? "true" : "false";
doc["warnAdminPass"] = config.getString("adminPassword") == ADMIN_PASS ? "true" : "false";
doc["warnApPass"] = config.getString("apPassword") == WIFI_PASS ? "true" : "false";
doc["status"] = "OK";

View File

@@ -184,5 +184,9 @@ if (!window.isSecureContext) {
</div>
</div>
<div class="hidden">
<a id="download"></a>
</div>
</body>
</html>

View File

@@ -582,7 +582,7 @@
}
function downloadData(data, name) {
let url = "data:application/octet-stream," + encodeURIComponent(JSON.stringify(data, undefined, 2));
let target = document.getElementById('downloadXdr');
let target = document.getElementById('download');
if (!target) return;
target.setAttribute('href', url);
target.setAttribute('download', name);