Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite313f45

Browse files
authored
fix: go to previous step when connection fails (#77)
- happens when an error is encountered during connection (likeexceptions caused by an expired token)- right now the auth wizard stays on the last step.- with this changeset the auth steps reset to the initial sign in forauto-connect, or it goes back one step back to the token input step formanual authentication
1 parenta509615 commite313f45

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
- action buttons on the token input step were swapped to achieve better keyboard navigation
1212

13+
###Fixed
14+
15+
- authorization wizard automatically goes to a previous screen when an error is encountered during connection to Coder deployment
16+
1317
##0.1.3 - 2025-04-09
1418

1519
###Fixed

‎src/main/kotlin/com/coder/toolbox/views/AuthWizardPage.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AuthWizardPage(
2222

2323
privateval signInStep=SignInStep(context)
2424
privateval tokenStep=TokenStep(context)
25-
privateval connectStep=ConnectStep(context, shouldAutoLogin,this::notify, onConnect)
25+
privateval connectStep=ConnectStep(context, shouldAutoLogin,this::notify,this::displaySteps,onConnect)
2626

2727

2828
/**

‎src/main/kotlin/com/coder/toolbox/views/ConnectStep.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class ConnectStep(
2727
privatevalcontext:CoderToolboxContext,
2828
privatevalshouldAutoLogin:StateFlow<Boolean>,
2929
privatevalnotify: (String,Throwable)->Unit,
30+
privatevalrefreshWizard: ()->Unit,
3031
privatevalonConnect: (
3132
client:CoderRestClient,
3233
cli:CoderCLIManager,
@@ -102,9 +103,13 @@ class ConnectStep(
102103
}catch (ex:CancellationException) {
103104
if (ex.message!=USER_HIT_THE_BACK_BUTTON) {
104105
notify("Connection to${url.host} was configured", ex)
106+
onBack()
107+
refreshWizard()
105108
}
106109
}catch (ex:Exception) {
107110
notify("Failed to configure${url.host}", ex)
111+
onBack()
112+
refreshWizard()
108113
}
109114
}
110115
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp