Show error messages to user
For example:
Current behaviour (v3); let's block access to the API (in case it is down)
sudo poetry run leap-con --reject-host 198.252.153.106
sudo poetry run leap-con --reject-host 198.252.153.67
sudo poetry run leap-con --reject-host 198.252.153.107
GUI behaviour
- GUI shows up, I can click "Turn On"
- location/gateway list is empty
- logging: it trys to connect to the API (over and over with some sleep) but it fails
- If I click on "Turn On"
- GUI goes into state "Connecting". The button shows "Cancel", but I can't click it
- It still trys to connect to the API, but fails. GUI stays in the "Connecting" state
- If connection to the API works again, then the VPN connection gets established (good!)
Desired behaviour
- In the Go code, there is also the state "failed" => use this state in the GUI
- current behaviour: If the state is "failed", the button (Turn On/Off) in the GUI is empty
- show message to user ("Could not speak with API or similar")
- Currently, we don't have a way to tell the user, if something goes wrong
- e.g. OpenVPN connection drops: state goes back to "Turn On", but there is no message
v5 implementation
I'm currently implementing v5. If I forget to start menshen locally, then there is an empty list of gateways. I still can click "Turn On" in the GUI, but that just hangs forever. Also, in v3 it trys to reconnect periodically to the API backend. We need to think about if we want just re-implment v3 or add a button "rescan gateways" or similar...