Don't show "add/remove folder to/from project" for remote projects

This commit is contained in:
Antonio Scandurra 2022-05-31 08:17:52 +02:00
parent 1eb03f2f4e
commit e4641da598

View file

@ -242,6 +242,7 @@ impl ProjectPanel {
if let Some((worktree, entry)) = self.selected_entry(cx) {
let is_root = Some(entry) == worktree.root_entry();
if !self.project.read(cx).is_remote() {
menu_entries.push(ContextMenuItem::item(
"Add Folder to Project",
workspace::AddFolderToProject,
@ -252,6 +253,7 @@ impl ProjectPanel {
workspace::RemoveFolderFromProject(worktree_id),
));
}
}
menu_entries.push(ContextMenuItem::item("New File", AddFile));
menu_entries.push(ContextMenuItem::item("New Folder", AddDirectory));
menu_entries.push(ContextMenuItem::Separator);