Skip to content

Commit 16b9788

Browse files
committed
Remove URL from setting description
It does not always make sense, for example if using it for the URL then it could say that dev.coder.com was the last URL used for dev.coder.com.
1 parent ac91ba5 commit 16b9788

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ enum class Source {
3333
/**
3434
* Return a description of the source.
3535
*/
36-
fun description(name: String, url: URL): String = when (this) {
36+
fun description(name: String): String = when (this) {
3737
CONFIG -> "This $name was pulled from your global CLI config."
38-
DEPLOYMENT_CONFIG -> "This $name was pulled from your CLI config for ${url.host}."
39-
LAST_USED -> "This last used $name for ${url.host}."
40-
QUERY -> "This $name was pulled from the Gateway link from ${url.host}."
41-
USER -> "The last used $name for ${url.host}."
38+
DEPLOYMENT_CONFIG -> "This $name was pulled from your deployment's CLI config."
39+
LAST_USED -> "This was the last used $name."
40+
QUERY -> "This $name was pulled from the Gateway link."
41+
USER -> "This was the last used $name."
4242
ENVIRONMENT -> "This $name was pulled from an environment variable."
43-
SETTINGS -> "This $name was pulled from your settings for Coder Gateway."
43+
SETTINGS -> "This $name was pulled from your settings."
4444
}
4545
}
4646

src/main/kotlin/com/coder/gateway/util/Dialogs.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class DialogUi(
210210
ask(
211211
title = "Session Token",
212212
description = error
213-
?: token?.second?.description("token", url)
213+
?: token?.second?.description("token")
214214
?: "No existing token for ${url.host} found.",
215215
placeholder = token?.first,
216216
link = Pair("Session Token:", getTokenUrl.toString()),

0 commit comments

Comments
 (0)