Skip to content

Commit 3df7c52

Browse files
committed
chore: improve delete dialog message
Make it clear to the user what does he need to type.
1 parent ad053d1 commit 3df7c52

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteEnvironment.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,14 @@ class CoderRemoteEnvironment(
147147
actions.add(CoderDelimiter(context.i18n.pnotr("")))
148148
actions.add(Action(context.i18n.ptrl("Delete workspace"), highlightInRed = true) {
149149
context.cs.launch {
150+
var dialogText =
151+
if (wsRawStatus.canStop()) "This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data."
152+
else "This will remove all information from the workspace, including files, unsaved changes, history, and usage data."
153+
dialogText += "\n\nType \"${workspace.name}\" below to confirm:"
154+
150155
val confirmation = context.ui.showTextInputPopup(
151156
if (wsRawStatus.canStop()) context.i18n.ptrl("Delete running workspace?") else context.i18n.ptrl("Delete workspace?"),
152-
if (wsRawStatus.canStop()) context.i18n.ptrl("This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data.")
153-
else context.i18n.ptrl("This will remove all information from the workspace, including files, unsaved changes, history, and usage data."),
157+
context.i18n.pnotr(dialogText),
154158
context.i18n.ptrl("Workspace name"),
155159
TextType.General,
156160
context.i18n.ptrl("OK"),

src/main/resources/localization/defaultMessages.po

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,5 @@ msgstr ""
187187
msgid "Delete running workspace?"
188188
msgstr ""
189189

190-
msgid "This will close the workspace and remove all its information, including files, unsaved changes, history, and usage data."
191-
msgstr ""
192-
193-
msgid "This will remove all information from the workspace, including files, unsaved changes, history, and usage data."
194-
msgstr ""
195-
196190
msgid "Workspace name"
197191
msgstr ""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy