Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: improve delete dialog message
Make it clear to the user what does he need to type.
  • Loading branch information
fioan89 committed Aug 21, 2025
commit 3df7c526b161643456c279b240167d889f6f0ccc
8 changes: 6 additions & 2 deletions src/main/kotlin/com/coder/toolbox/CoderRemoteEnvironment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ class CoderRemoteEnvironment(
actions.add(CoderDelimiter(context.i18n.pnotr("")))
actions.add(Action(context.i18n.ptrl("Delete workspace"), highlightInRed = true) {
context.cs.launch {
var dialogText =
if (wsRawStatus.canStop()) "This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data."
else "This will remove all information from the workspace, including files, unsaved changes, history, and usage data."
dialogText += "\n\nType \"${workspace.name}\" below to confirm:"

val confirmation = context.ui.showTextInputPopup(
if (wsRawStatus.canStop()) context.i18n.ptrl("Delete running workspace?") else context.i18n.ptrl("Delete workspace?"),
if (wsRawStatus.canStop()) context.i18n.ptrl("This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data.")
else context.i18n.ptrl("This will remove all information from the workspace, including files, unsaved changes, history, and usage data."),
context.i18n.pnotr(dialogText),
context.i18n.ptrl("Workspace name"),
TextType.General,
context.i18n.ptrl("OK"),
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/localization/defaultMessages.po
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,5 @@ msgstr ""
msgid "Delete running workspace?"
msgstr ""

msgid "This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data."
msgstr ""

msgid "This will remove all information from the workspace, including files, unsaved changes, history, and usage data."
msgstr ""

msgid "Workspace name"
msgstr ""
Loading