mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 13:24:19 +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) {
|
if let Some((worktree, entry)) = self.selected_entry(cx) {
|
||||||
let is_root = Some(entry) == worktree.root_entry();
|
let is_root = Some(entry) == worktree.root_entry();
|
||||||
menu_entries.push(ContextMenuItem::item(
|
if !self.project.read(cx).is_remote() {
|
||||||
"Add Folder to Project",
|
|
||||||
workspace::AddFolderToProject,
|
|
||||||
));
|
|
||||||
if is_root {
|
|
||||||
menu_entries.push(ContextMenuItem::item(
|
menu_entries.push(ContextMenuItem::item(
|
||||||
"Remove Folder from Project",
|
"Add Folder to Project",
|
||||||
workspace::RemoveFolderFromProject(worktree_id),
|
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 File", AddFile));
|
||||||
menu_entries.push(ContextMenuItem::item("New Folder", AddDirectory));
|
menu_entries.push(ContextMenuItem::item("New Folder", AddDirectory));
|
||||||
|
|
Loading…
Reference in a new issue