From 237cc9b4a9340e7cd23c12ef9ef4988deeecc520 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Mon, 6 May 2024 17:30:06 +0200 Subject: [PATCH] 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 --- crates/recent_projects/src/dev_servers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/recent_projects/src/dev_servers.rs b/crates/recent_projects/src/dev_servers.rs index f432235a5b..d2519b434e 100644 --- a/crates/recent_projects/src/dev_servers.rs +++ b/crates/recent_projects/src/dev_servers.rs @@ -328,7 +328,7 @@ impl DevServerProjects { fn delete_dev_server(&mut self, id: DevServerId, cx: &mut ViewContext) { 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, ) { 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"],