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

fix: access the settings page for the auth. wizard#105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fioan89 merged 1 commit intomainfromconfigure-settings-from-login-page
May 5, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@

- rendering glitches when a Workspace is stopped while SSH connection is alive
- misleading message saying that there are no workspaces rendered during manual authentication
- Coder Settings can now be accessed from the authentication wizard

## 0.2.0 - 2025-04-24

Expand Down
4 changes: 2 additions & 2 deletionssrc/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -296,7 +296,7 @@ class CoderRemoteProvider(
if (autologin && lastDeploymentURL.isNotBlank() && (lastToken.isNotBlank() || !settings.requireTokenAuth)) {
try {
AuthWizardState.goToStep(WizardStep.LOGIN)
return AuthWizardPage(context, true, ::onConnect)
return AuthWizardPage(context,settingsPage,true, ::onConnect)
} catch (ex: Exception) {
errorBuffer.add(ex)
}
Expand All@@ -306,7 +306,7 @@ class CoderRemoteProvider(
firstRun = false

// Login flow.
val authWizard = AuthWizardPage(context, false, ::onConnect)
val authWizard = AuthWizardPage(context,settingsPage,false, ::onConnect)
// We might have navigated here due to a polling error.
errorBuffer.forEach {
authWizard.notify("Error encountered", it)
Expand Down
12 changes: 9 additions & 3 deletionssrc/main/kotlin/com/coder/toolbox/views/AuthWizardPage.kt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,14 +12,17 @@ import kotlinx.coroutines.flow.update

class AuthWizardPage(
private val context: CoderToolboxContext,
private val settingsPage: CoderSettingsPage,
initialAutoLogin: Boolean = false,
onConnect: (
client: CoderRestClient,
cli: CoderCLIManager,
) -> Unit,
) : CoderPage(context, context.i18n.ptrl("Authenticate to Coder")) {
) : CoderPage(context, context.i18n.ptrl("Authenticate to Coder"), false) {
private val shouldAutoLogin = MutableStateFlow(initialAutoLogin)

private val settingsAction = Action(context.i18n.ptrl("Settings"), actionBlock = {
context.ui.showUiPage(settingsPage)
})
private val signInStep = SignInStep(context, this::notify)
private val tokenStep = TokenStep(context)
private val connectStep = ConnectStep(context, shouldAutoLogin, this::notify, this::displaySteps, onConnect)
Expand DownExpand Up@@ -47,7 +50,8 @@ class AuthWizardPage(
if (signInStep.onNext()) {
displaySteps()
}
})
}),
settingsAction
)
}
signInStep.onVisible()
Expand All@@ -64,6 +68,7 @@ class AuthWizardPage(
displaySteps()
}
}),
settingsAction,
Action(context.i18n.ptrl("Back"), closesPage = false, actionBlock = {
tokenStep.onBack()
displaySteps()
Expand All@@ -79,6 +84,7 @@ class AuthWizardPage(
}
actionButtons.update {
listOf(
settingsAction,
Action(context.i18n.ptrl("Back"), closesPage = false, actionBlock = {
connectStep.onBack()
shouldAutoLogin.update {
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp