SOTAmat / SOTAcat

CAT control for Elecraft KX radios and SOTAMAT
https://sotamat.com
Other
11 stars 2 forks source link

improve Settings UI #36

Closed jeffkowalski closed 8 months ago

jeffkowalski commented 8 months ago

Most important is danger of the hitting factory reset button without secondary confirmation, clearing wifi credentials.

Beyond that, I'd say the whole Settings page is ugly and could use a bunch of work to make it 1) more aesthetic, and 2) implement a variety of checks like a) are you sure you want to factory reset? and b) checks to ensure ssids are either empty or >= 2 and <= MAX_WIFI_SSID_SIZE chars and passwords are either empty or >= 8 and <= MAX_WIFI_PASS_SIZE chars. There are some rudiments of the latter already in the HTML, but no validation.

brianmathews commented 8 months ago

I validated that the Web-Serial firmware flash code on https://sotamat.com/sotacat does overwrite the NVS settings and performs a full "factory reset". Since I don't see a use case for a factory reset while in the field, I suggest we remove the factory reset button. For people in-the-shack, they can use the firmware flash button with a USB cable which avoids accidents.

What might be better in the HTML is a "Save and Reboot" button, so that after you make your edits you can reboot with them applied.

Agreed?

jeffkowalski commented 8 months ago

Sure that's a reasonable way of erasing the NVS. I'll take out the factory reset button and code.

brianmathews commented 8 months ago

I did not add the requested value checking.