Skip to content

Commit 632e840

Browse files
committed
Update incorrect existing token label
This changed to automatically use the token, no confirmation.
1 parent 792195d commit 632e840

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/main/kotlin/com/coder/gateway/CoderRemoteConnectionHandle.kt

+9-6
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,16 @@ class CoderRemoteConnectionHandle {
179179
}
180180

181181
/**
182-
* Open a dialog for providing the token. Show any existing token so the
183-
* user can validate it if a previous connection failed. If we are not
184-
* retrying and the user has not checked the existing token box then open a
185-
* browser to the auth page. If the user has checked the existing token box
186-
* then populate the dialog with the token on disk (this will overwrite any
182+
* Open a dialog for providing the token. Show any existing token so
183+
* the user can validate it if a previous connection failed.
184+
*
185+
* If we are not retrying and the user has not checked the existing
186+
* token box then also open a browser to the auth page.
187+
*
188+
* If the user has checked the existing token box then return the token
189+
* on disk immediately and skip the dialog (this will overwrite any
187190
* other existing token) unless this is a retry to avoid clobbering the
188-
* token that just failed. Return the token submitted by the user.
191+
* token that just failed.
189192
*/
190193
@JvmStatic
191194
fun askToken(

src/main/resources/messages/CoderGatewayBundle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gateway.connector.action.text=Connect to Coder
44
gateway.connector.view.login.documentation.action=Learn more about Coder
55
gateway.connector.view.login.url.label=URL:
66
gateway.connector.view.login.existing-token.label=Use existing token
7-
gateway.connector.view.login.existing-token.tooltip=Checking "{0}" will prevent the browser from being launched for generating a new token after pressing "{1}". Additionally, if a token is already configured for this URL via the CLI it will appear as the default and can be used as-is or replaced.
7+
gateway.connector.view.login.existing-token.tooltip=Checking "{0}" will prevent the browser from being launched for generating a new token after pressing "{1}". Additionally, if a token is already configured for this URL via the CLI it will automatically be used.
88
gateway.connector.view.login.token.dialog=Paste your token here:
99
gateway.connector.view.login.token.label=Session Token:
1010
gateway.connector.view.coder.workspaces.header.text=Coder Workspaces

0 commit comments

Comments
 (0)