You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two problems on the settings footer, both of which let a refused save look
like nothing had happened.
A long message pushed Reset tiles onto a line of its own and slid Reset to
defaults across, so the buttons jumped whenever the drawer had something to
say. The message now takes the space the buttons leave and wraps inside it,
which also keeps them pinned right when there is no message at all.
The Save button now turns red when a click did not save, and stays that way
until one does. Every refusal already explained itself beside the button,
but the drawer stayed open looking untouched, which reads as a click that
missed. Discarding and reopening starts clean, and the colour comes from
each theme's own palette rather than a fixed red.
Co-Authored-By: Claude <noreply@anthropic.com>
// If the city/ID box still has text, search it first so settingsBody() captures
7800
7815
// the resulting scope - covers "typed but never clicked Search" and "changed the
@@ -7804,14 +7819,14 @@ <h2><span class="drag-handle" title="Drag to reorder" aria-hidden="true"><svg vi
7804
7819
// Don't save the old scope under a failed search - but an emptied box means the
7805
7820
// user gave up on that query (Auto location's programmatic clear included), so it
7806
7821
// no longer blocks. The failed text is kept in the box, so "fix" is followable.
7807
-
if(serverSearchFailed && $('serverCity').value.trim()){ $('settingsMsg').textContent='Could not find that server/city - fix the search or clear the box before saving.'; return; }
7822
+
if(serverSearchFailed && $('serverCity').value.trim()){ saveFailed('Could not find that server/city - fix the search or clear the box before saving.'); return; }
7808
7823
// Same rule for a bad iperf3 address: block rather than save around it, otherwise the
7809
7824
// save reports success while that field silently kept its old value.
7810
7825
const addrErr=iperfAddrError();
7811
7826
if(addrErr){
7812
7827
iperfAddrBad(addrErr);
7813
7828
activateTab('server'); $('setIperfAddr').focus();
7814
-
$('settingsMsg').textContent='Fix the iperf3 server address before saving.';
7829
+
saveFailed('Fix the iperf3 server address before saving.');
7815
7830
return;
7816
7831
}
7817
7832
// A renamed server whose stored password was never re-entered: the save would
@@ -7826,27 +7841,27 @@ <h2><span class="drag-handle" title="Drag to reorder" aria-hidden="true"><svg vi
7826
7841
{ const orphan=iperfPwOrphan();
7827
7842
if(orphan){
7828
7843
activateTab('server');
7829
-
$('settingsMsg').textContent='Re-enter '+(orphan.label||orphan.orig_addr)+"'s password (its address changed), or change the address back, before saving.";
7844
+
saveFailed('Re-enter '+(orphan.label||orphan.orig_addr)+"'s password (its address changed), or change the address back, before saving.");
7830
7845
return;
7831
7846
} }
7832
7847
const body = settingsBody(); // captures the open iperf3 editor (incl. a just-typed address) too
7833
7848
// iperf3 with no valid server set would fail every run ("no iperf3 server set") - block
7834
7849
// the save and point the user at the fix rather than persist a broken engine.
@@ -7871,8 +7886,8 @@ <h2><span class="drag-handle" title="Drag to reorder" aria-hidden="true"><svg vi
7871
7886
if(lb) flashStatus('Saved - but '+(lb.label||lb.addr)+' points at localhost, which inside this bridged container is the container itself, not the machine running your iperf3 server. Use the host\'s LAN IP or host.docker.internal.'); } }
7872
7887
// Access was POSTed first (and applied); if the settings POST fails, say so -
7873
7888
// so Discard isn't mistaken for "nothing was saved".
7874
-
else msg.textContent=(await r.text())+' (access/security settings, if changed, were already applied)';
7875
-
} catch(e){ msg.textContent='failed'; }
7889
+
else saveFailed((await r.text())+' (access/security settings, if changed, were already applied)');
0 commit comments