mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Don't show "add/remove folder to/from project" for remote projects
This commit is contained in:
parent
1eb03f2f4e
commit
e4641da598
1 changed files with 9 additions and 7 deletions
|
@ -242,15 +242,17 @@ impl ProjectPanel {
|
|||
|
||||
if let Some((worktree, entry)) = self.selected_entry(cx) {
|
||||
let is_root = Some(entry) == worktree.root_entry();
|
||||
menu_entries.push(ContextMenuItem::item(
|
||||
"Add Folder to Project",
|
||||
workspace::AddFolderToProject,
|
||||
));
|
||||
if is_root {
|
||||
if !self.project.read(cx).is_remote() {
|
||||
menu_entries.push(ContextMenuItem::item(
|
||||
"Remove Folder from Project",
|
||||
workspace::RemoveFolderFromProject(worktree_id),
|
||||
"Add Folder to Project",
|
||||
workspace::AddFolderToProject,
|
||||
));
|
||||
if is_root {
|
||||
menu_entries.push(ContextMenuItem::item(
|
||||
"Remove Folder from Project",
|
||||
workspace::RemoveFolderFromProject(worktree_id),
|
||||
));
|
||||
}
|
||||
}
|
||||
menu_entries.push(ContextMenuItem::item("New File", AddFile));
|
||||
menu_entries.push(ContextMenuItem::item("New Folder", AddDirectory));
|
||||
|
|
Loading…
Reference in a new issue