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

@ -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,