From f41d7529897ede3b49cce12178e00abba0dd7981 Mon Sep 17 00:00:00 2001 From: Faur Ioan-Aurel Date: Thu, 3 Apr 2025 23:10:57 +0300 Subject: [PATCH] fix: redirect user to the login screen after log out from a deployment - 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. - resolve #34 --- CHANGELOG.md | 4 ++++ src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b4457..da6e3d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- after log out, user is redirected back to the initial log in screen + ## 0.1.1 - 2025-04-03 ### Fixed diff --git a/src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt b/src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt index 9939645..6c30d5b 100644 --- a/src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt +++ b/src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt @@ -187,7 +187,10 @@ class CoderRemoteProvider( override fun getAccountDropDown(): DropDownMenu? { val username = client?.me?.username if (username != null) { - return dropDownFactory(context.i18n.pnotr(username), { logout() }) + return dropDownFactory(context.i18n.pnotr(username)) { + logout() + context.ui.showUiPage(getOverrideUiPage()!!) + } } return null } @@ -211,6 +214,7 @@ class CoderRemoteProvider( lastEnvironments.clear() environments.value = LoadableState.Value(emptyList()) isInitialized.update { false } + client = null } override val svgIcon: SvgIcon = pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy