remoting: Adjust prompt level for dev server prompts (#11440)

This changes the remoting prompts to use `PromptLevel::Warning` instead
of `PromptLevel::Destructive`.
In #11015 we decided to apply PromptLevel::Destructive to prompts other
than the new path picker. However, we did not notice that this breaks
confirmation with the keyboard, so it should really only be used in
specific situations (e.g. replacing a file with the remote "save as"
picker, because it matches the behavior of the macOS file dialog).

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner
2024-05-06 17:30:06 +02:00
committed by GitHub
parent 38a50a042a
commit 237cc9b4a9
+2 -2
View File
@@ -328,7 +328,7 @@ impl DevServerProjects {
fn delete_dev_server(&mut self, id: DevServerId, cx: &mut ViewContext<Self>) {
let answer = cx.prompt(
gpui::PromptLevel::Destructive,
gpui::PromptLevel::Warning,
"Are you sure?",
Some("This will delete the dev server and all of its remote projects."),
&["Delete", "Cancel"],
@@ -375,7 +375,7 @@ impl DevServerProjects {
cx: &mut ViewContext<Self>,
) {
let answer = cx.prompt(
gpui::PromptLevel::Destructive,
gpui::PromptLevel::Warning,
format!("Delete \"{}\"?", path).as_str(),
Some("This will delete the remote project. You can always re-add it later."),
&["Delete", "Cancel"],