Skip to content

Commit 91a91d7

Browse files
authoredApr 3, 2025
fix: redirect user to the login screen after log out from a deployment (#65)
- up until now after users hits the drop-down log out action he was presented with a blank page and had to restart Toolbox in order to reach out to the login screen. - resolves #34
1 parent e210c3c commit 91a91d7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixed
6+
7+
- after log out, user is redirected back to the initial log in screen
8+
59
## 0.1.1 - 2025-04-03
610

711
### Fixed

‎src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ class CoderRemoteProvider(
187187
override fun getAccountDropDown(): DropDownMenu? {
188188
val username = client?.me?.username
189189
if (username != null) {
190-
return dropDownFactory(context.i18n.pnotr(username), { logout() })
190+
return dropDownFactory(context.i18n.pnotr(username)) {
191+
logout()
192+
context.ui.showUiPage(getOverrideUiPage()!!)
193+
}
191194
}
192195
return null
193196
}
@@ -211,6 +214,7 @@ class CoderRemoteProvider(
211214
lastEnvironments.clear()
212215
environments.value = LoadableState.Value(emptyList())
213216
isInitialized.update { false }
217+
client = null
214218
}
215219

216220
override val svgIcon: SvgIcon =

0 commit comments

Comments
 (0)