Disallow adding folders to projects and opening the terminal in remote projects (#11261)

Release Notes:

- Fixed broken UI in remote projects

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-05-01 16:04:59 -06:00 committed by GitHub
parent e5b88ac8c2
commit fa0253bc5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 23 deletions

View file

@ -1693,6 +1693,13 @@ impl Workspace {
}
fn add_folder_to_project(&mut self, _: &AddFolderToProject, cx: &mut ViewContext<Self>) {
if self.project.read(cx).is_remote() {
self.show_error(
&anyhow!("Folders cannot yet be added to remote projects"),
cx,
);
return;
}
let paths = cx.prompt_for_paths(PathPromptOptions {
files: false,
directories: true,