fix(diagnostic): FritzBox-Benutzer optional — Password-only-Boxen speicherbar
Das Credentials-Modal speicherte FritzBox-Zugangsdaten nur, wenn das Benutzer- Feld ausgefuellt war (if fu) — Username war damit faktisch Pflicht. FritzBoxen ohne benannten Benutzer haben aber nur ein Passwort. Jetzt: gespeichert sobald User ODER Passwort gesetzt ist; Placeholder kennzeichnet den User als optional. Backend (_do_fritzbox) verlangte ohnehin nur das Passwort. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,7 @@
|
|||||||
|
|
||||||
<div style="border:1px solid #1E1E2E;border-radius:6px;padding:10px;">
|
<div style="border:1px solid #1E1E2E;border-radius:6px;padding:10px;">
|
||||||
<div style="color:#E0E0F0;font-weight:600;margin-bottom:6px;">FritzBox (TR-064)</div>
|
<div style="color:#E0E0F0;font-weight:600;margin-bottom:6px;">FritzBox (TR-064)</div>
|
||||||
<input id="dc-fb-user" placeholder="FritzBox-Benutzer" style="width:100%;margin-bottom:4px;">
|
<input id="dc-fb-user" placeholder="FritzBox-Benutzer (optional, leer wenn keiner)" style="width:100%;margin-bottom:4px;">
|
||||||
<input id="dc-fb-pass" type="password" placeholder="FritzBox-Passwort" style="width:100%;">
|
<input id="dc-fb-pass" type="password" placeholder="FritzBox-Passwort" style="width:100%;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -4649,8 +4649,11 @@
|
|||||||
}
|
}
|
||||||
const hu = document.getElementById('dc-http-user').value.trim();
|
const hu = document.getElementById('dc-http-user').value.trim();
|
||||||
if (hu) creds.http = { user: hu, pass: document.getElementById('dc-http-pass').value };
|
if (hu) creds.http = { user: hu, pass: document.getElementById('dc-http-pass').value };
|
||||||
|
// FritzBox: Benutzer optional (Password-only-Boxen haben keinen) — es reicht
|
||||||
|
// ein Passwort. Gespeichert wird, sobald User ODER Passwort gesetzt ist.
|
||||||
const fu = document.getElementById('dc-fb-user').value.trim();
|
const fu = document.getElementById('dc-fb-user').value.trim();
|
||||||
if (fu) creds.fritzbox = { user: fu, pass: document.getElementById('dc-fb-pass').value };
|
const fp = document.getElementById('dc-fb-pass').value;
|
||||||
|
if (fu || fp) creds.fritzbox = { user: fu, pass: fp };
|
||||||
if (!Object.keys(creds).length) { document.getElementById('dc-status').textContent = 'Nichts zu speichern — mindestens einen Typ ausfuellen.'; return; }
|
if (!Object.keys(creds).length) { document.getElementById('dc-status').textContent = 'Nichts zu speichern — mindestens einen Typ ausfuellen.'; return; }
|
||||||
send({ action: 'sat_creds_set', satellite: credsModalSat, ip: credsModalIp, creds });
|
send({ action: 'sat_creds_set', satellite: credsModalSat, ip: credsModalIp, creds });
|
||||||
document.getElementById('dc-status').textContent = 'Speichere …';
|
document.getElementById('dc-status').textContent = 'Speichere …';
|
||||||
|
|||||||
Reference in New Issue
Block a user