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:
parent
e5b88ac8c2
commit
fa0253bc5a
4 changed files with 43 additions and 23 deletions
|
@ -430,6 +430,7 @@ impl ProjectPanel {
|
|||
let worktree_id = worktree.id();
|
||||
let is_local = project.is_local();
|
||||
let is_read_only = project.is_read_only();
|
||||
let is_remote = project.is_remote();
|
||||
|
||||
let context_menu = ContextMenu::build(cx, |menu, cx| {
|
||||
menu.context(self.focus_handle.clone()).when_else(
|
||||
|
@ -476,10 +477,12 @@ impl ProjectPanel {
|
|||
})
|
||||
.when(is_local & is_root, |menu| {
|
||||
menu.separator()
|
||||
.action(
|
||||
"Add Folder to Project…",
|
||||
Box::new(workspace::AddFolderToProject),
|
||||
)
|
||||
.when(!is_remote, |menu| {
|
||||
menu.action(
|
||||
"Add Folder to Project…",
|
||||
Box::new(workspace::AddFolderToProject),
|
||||
)
|
||||
})
|
||||
.entry(
|
||||
"Remove from Project",
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue