Closed cgalpin closed 3 years ago
thank you good sir!
Actually, my apologies. I committed the version I had offered, not the simpler one. If you'd prefer, I can do
# both uid and alias are required
if len(uid) == 0 or len(alias) == 0:
error = f'Both Machine/Product ID and Alias are required'
current_app.logger.error(error)
return render_template_with_defaults('devices.html', error=error,
config=server_config(), active_sessions=active_sessions)
It's all good.
Also since we are using the id as a HTML id we should make sure to trim
any user provided input. I selected a UID on my mobile device and didn't double check it before aliasing the device via the UI and got " xyz" which now breaks the UI 😜 . All this non-sense to support those that can't understand a network share 🤦♂️
I think you have to make it easy to use. Not everyone is computer savvy, or even have computers. Kids these days just use phones and tablets and seem to be fine with it.
I'm guessing like me, you guys are close to yelling get off my lawn! 😉
If people find this too hard they can go with "the other option" and buy a much more expensive M$ computer 🤣, or I know plenty of folks that will take a "trash" destined unit for "repurposing"
Without this check, empty values can be written to config.yaml that cannot be deleted. They also look odd without a name :)