FoldingAtHome / fah-web-client-bastet

Folding@home client frontend
GNU General Public License v3.0
18 stars 6 forks source link

CTRL+C isn't a good keystroke for 'Connect directly to a client' #166

Closed Hou5e closed 1 month ago

Hou5e commented 1 month ago

There were many times where I wanted to copy text from the web UI in FAH v8.4.1, where the keystroke CTRL+C brings up the 'Connect directly to a client' dialog on the: Machines page, Log page, Account Settings page (any of the pages). This behavior was unexpected, and a different keystroke should be used for that dialog (or a button somewhere in the UI).

kbernhagen commented 1 month ago

No keystroke is good for mobile. A button would work better.

jcoffland commented 1 month ago

I've moved it to the machine settings page.

kbernhagen commented 1 month ago

Of course, it cannot be changed when there is no existing direct connection.

jcoffland commented 1 month ago

True. It exists it's just hidden unless it makes a connection. Maybe we need a double-tap somewhere to unhide it.

The problem is that I want it to work without having to login to your account so it cannot go in account settings. But I don't really want to add another button for it on the main screen because it's not something most users should worry about.

kbernhagen commented 1 month ago

So if a user has a client elsewhere or on a different port, there is no way to point web control at that client. Unless it is also linked to an account.

This was handled fairly transparently by the old default_address() code. At least for non-default ports and accessing a remote local web control.

kbernhagen commented 1 month ago

The only general solution I can think of is to have a direct clients list panel.

kbernhagen commented 1 month ago

Most people will not be changing allow, allowed-origins or http-addresses, so maybe none of this matters much.

jcoffland commented 1 month ago

Right, this is really only a niche feature.

kbernhagen commented 1 month ago

The direct address field is very brittle. If left off, the default port is not added. It seems I cannot use other named hosts. If made blank, it doesn't default to 127.0.0.1:7396.

jcoffland commented 1 month ago

I've moved this back to a hotkey. This time CTRL+SHIFT+L. I don't think it is necessary to support this on mobile and I don't like have this option exposed in machine settings. Users are likely to change it and end up with a broken client.

I also added some input validation. This does not prevent all possible bad inputs.