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(
145145 })
146146 }
147147 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 ) {
149149 context.cs.launch {
150150 val confirmation = context.ui.showTextInputPopup(
151151 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(
5858class Action (
5959 description : LocalizableString ,
6060 closesPage : Boolean = false ,
61+ highlightInRed : Boolean = false ,
6162 enabled : () -> Boolean = { true },
6263 private val actionBlock : () -> Unit ,
6364) : RunnableActionDescription {
6465 override val label: LocalizableString = description
6566 override val shouldClosePage: Boolean = closesPage
6667 override val isEnabled: Boolean = enabled()
68+ override val isDangerous: Boolean = highlightInRed
6769 override fun run () {
6870 actionBlock()
6971 }
You can’t perform that action at this time.
0 commit comments