diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:15:34 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:15:34 +0200 |
| commit | 80218da58eca9c95870770f88e477891e8fdb50a (patch) | |
| tree | 66f685f2bcbbaaac0031d2e7a83f306358043a88 /internal | |
| parent | 0c9a300a58d9dacce7b84ff93222eed35eab5721 (diff) | |
State + FSM + Exports: Implement changing a secure internet location
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/fsm/fsm.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go index b822a72..8b5875b 100644 --- a/internal/fsm/fsm.go +++ b/internal/fsm/fsm.go @@ -132,9 +132,9 @@ type FSM struct { func (fsm *FSM) Init(name string, callback func(string, string, string), directory string, debug bool) { fsm.States = FSMStates{ DEREGISTERED: FSMState{Transitions: []FSMTransition{{NO_SERVER, "Client registers"}}}, - NO_SERVER: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "User chooses a server"}, {SEARCH_SERVER, "The user is trying to choose a Server in the UI"}, {CONNECTED, "The user is already connected"}}}, + NO_SERVER: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "User chooses a server"}, {SEARCH_SERVER, "The user is trying to choose a Server in the UI"}, {CONNECTED, "The user is already connected"}, {ASK_LOCATION, "Change the location in the main screen"}}}, SEARCH_SERVER: FSMState{Transitions: []FSMTransition{{LOADING_SERVER, "User clicks a server in the UI"}, {NO_SERVER, "Cancel or Error"}}, BackState: NO_SERVER}, - ASK_LOCATION: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "Location chosen"}, {NO_SERVER, "Cancel or Error"}, {SEARCH_SERVER, "Cancel or Error"}}}, + ASK_LOCATION: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "Location chosen"}, {NO_SERVER, "Go back or Error"}, {SEARCH_SERVER, "Cancel or Error"}}}, LOADING_SERVER: FSMState{Transitions: []FSMTransition{{CHOSEN_SERVER, "Server info loaded"}, {ASK_LOCATION, "User chooses a Secure Internet server but no location is configured"}}}, CHOSEN_SERVER: FSMState{Transitions: []FSMTransition{{AUTHORIZED, "Found tokens in config"}, {OAUTH_STARTED, "No tokens found in config"}}}, OAUTH_STARTED: FSMState{Transitions: []FSMTransition{{AUTHORIZED, "User authorizes with browser"}, {NO_SERVER, "Cancel or Error"}, {SEARCH_SERVER, "Cancel or Error"}}, BackState: NO_SERVER}, |
