File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
src/main/kotlin/com/coder/toolbox Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ class CoderRemoteEnvironment(
145
145
})
146
146
}
147
147
actions.add(CoderDelimiter (context.i18n.pnotr(" " )))
148
- actions.add(Action (context.i18n.ptrl(" Delete workspace" )) {
148
+ actions.add(Action (context.i18n.ptrl(" Delete workspace" ), highlightInRed = true ) {
149
149
context.cs.launch {
150
150
val confirmation = context.ui.showTextInputPopup(
151
151
if (wsRawStatus.canStop()) context.i18n.ptrl(" Delete running workspace?" ) else context.i18n.ptrl(" Delete workspace?" ),
Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ abstract class CoderPage(
58
58
class Action (
59
59
description : LocalizableString ,
60
60
closesPage : Boolean = false ,
61
+ highlightInRed : Boolean = false ,
61
62
enabled : () -> Boolean = { true },
62
63
private val actionBlock : () -> Unit ,
63
64
) : RunnableActionDescription {
64
65
override val label: LocalizableString = description
65
66
override val shouldClosePage: Boolean = closesPage
66
67
override val isEnabled: Boolean = enabled()
68
+ override val isDangerous: Boolean = highlightInRed
67
69
override fun run () {
68
70
actionBlock()
69
71
}
You can’t perform that action at this time.
0 commit comments