DCC-EX / WebThrottle-EX

WebThrottle-EX is a web based (html,jQuery,JavaScript) Controller/Throttle for DCC-EX EX-CommandStations
https://dcc-ex.com/WebThrottle-EX
GNU General Public License v3.0
21 stars 14 forks source link

Add guard to warn user if no serial ports are found #81

Open Brunius opened 1 year ago

Brunius commented 1 year ago

This is a simple UX change to catch the low hanging fruit of "why doesn't this work? I hit the button and nothing happens!".

Before - Click the button, and this is what you see (no change) image

After - Click the button, and an alert pops up! image

So far, I have only tested this in Firefox and Edge. Edge will always offer you the option of COM1 on Windows, so it may be necessary to test this on another OS with a Chromium 89+ browser and no serial ports to confirm full coverage.

This impacts on some of the same areas as issue #42 - it's not a fix for operations in non-Chromium browsers, but it should at least let people know what's going on.

Brunius commented 1 year ago
Brunius commented 1 year ago

Tested on Firefox 114.0.1 (64-bit) and Edge 114.0.1823.43 (64-bit) on Windows 10, with no issues as far as I could see