diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-09 14:18:23 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-09 14:18:23 +0200 |
| commit | 1ef27cc47ad56a2c66aaa40e398a0063be2573d4 (patch) | |
| tree | fff365577d82274f2b05878e702238b8a575c5c8 /internal/fsm.go | |
| parent | fd0753c5463b4c54d09712336301e174f05e05ab (diff) | |
FSM/State: Profile correctness and connect name change
Also add a force tcp flag
Diffstat (limited to 'internal/fsm.go')
| -rw-r--r-- | internal/fsm.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/fsm.go b/internal/fsm.go index 0b9ad1e..b52b463 100644 --- a/internal/fsm.go +++ b/internal/fsm.go @@ -106,12 +106,12 @@ func (fsm *FSM) Init(name string, callback func(string, string, string), logger DEREGISTERED: {{NO_SERVER, "Client registers"}}, NO_SERVER: {{CHOSEN_SERVER, "User chooses a server"}}, CHOSEN_SERVER: {{AUTHORIZED, "Found tokens in config"}, {OAUTH_STARTED, "No tokens found in config"}}, - OAUTH_STARTED: {{AUTHORIZED, "User authorizes with browser"}, {CHOSEN_SERVER, "Cancel OAuth"}}, + OAUTH_STARTED: {{AUTHORIZED, "User authorizes with browser"}, {NO_SERVER, "Cancel or Error"}}, AUTHORIZED: {{OAUTH_STARTED, "Re-authorize with OAuth"}, {REQUEST_CONFIG, "Client requests a config"}}, - REQUEST_CONFIG: {{ASK_PROFILE, "Multiple profiles found"}, {HAS_CONFIG, "Success, only one profile"}}, - ASK_PROFILE: {{HAS_CONFIG, "User chooses profile and success"}}, - HAS_CONFIG: {{CONNECTED, "OS reports connected"}}, - CONNECTED: {{AUTHORIZED, "OS reports disconnected"}}, + REQUEST_CONFIG: {{ASK_PROFILE, "Multiple profiles found and no profile chosen"}, {HAS_CONFIG, "Only one profile or profile already chosen"}, {NO_SERVER, "Cancel or Error"}, {OAUTH_STARTED, "Re-authorize"}}, + ASK_PROFILE: {{HAS_CONFIG, "User chooses profile"}, {NO_SERVER, "Done but no profile selected"}}, + HAS_CONFIG: {{CONNECTED, "OS reports connected"}, {REQUEST_CONFIG, "User chooses a new profile"}, {NO_SERVER, "User wants to choose a new server"}}, + CONNECTED: {{HAS_CONFIG, "OS reports disconnected"}}, } fsm.Current = DEREGISTERED fsm.Name = name |
