Skip to content

Commit cc07fac

Browse files
committed
re-add wrapping to description label
1 parent 9c876af commit cc07fac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/kotlin/com/coder/gateway/views/CoderGatewayRecentWorkspaceConnectionsView.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,14 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
174174
val workspaceWithAgent = deployment?.items?.firstOrNull { it.workspace.name == workspaceName }
175175
val status =
176176
if (deploymentError != null) {
177-
Triple(UIUtil.getBalloonErrorIcon(), UIUtil.getErrorForeground(), deploymentError)
177+
Pair(UIUtil.getErrorForeground(), deploymentError)
178178
} else if (workspaceWithAgent != null) {
179-
Triple(
180-
workspaceWithAgent.status.icon,
179+
Pair(
181180
workspaceWithAgent.status.statusColor(),
182181
workspaceWithAgent.status.description,
183182
)
184183
} else {
185-
Triple(AnimatedIcon.Default.INSTANCE, UIUtil.getContextHelpForeground(), "Querying workspace status...")
184+
Pair(UIUtil.getContextHelpForeground(), "Querying workspace status...")
186185
}
187186
val gap =
188187
if (top) {
@@ -210,7 +209,9 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
210209
if (inLoadingState) {
211210
icon(AnimatedIcon.Default())
212211
}
213-
label(workspaceWithAgent?.status?.description.orEmpty())
212+
label("<html><body style='width:350px;'>" + status.second + "</html>").applyToComponent {
213+
foreground = status.first
214+
}
214215
}
215216

216217
row {

0 commit comments

Comments
 (0)