Start work on read-only project access for channel guests
Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
1bc2e0ee5c
commit
28c39aae17
12 changed files with 160 additions and 57 deletions
|
@ -1184,7 +1184,7 @@ impl Workspace {
|
|||
mut save_intent: SaveIntent,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Task<Result<bool>> {
|
||||
if self.project.read(cx).is_read_only() {
|
||||
if self.project.read(cx).is_disconnected() {
|
||||
return Task::ready(Ok(true));
|
||||
}
|
||||
let dirty_items = self
|
||||
|
@ -2508,7 +2508,7 @@ impl Workspace {
|
|||
}
|
||||
|
||||
fn update_window_edited(&mut self, cx: &mut ViewContext<Self>) {
|
||||
let is_edited = !self.project.read(cx).is_read_only()
|
||||
let is_edited = !self.project.read(cx).is_disconnected()
|
||||
&& self
|
||||
.items(cx)
|
||||
.any(|item| item.has_conflict(cx) || item.is_dirty(cx));
|
||||
|
@ -3632,7 +3632,7 @@ impl Render for Workspace {
|
|||
})),
|
||||
)
|
||||
.child(self.status_bar.clone())
|
||||
.children(if self.project.read(cx).is_read_only() {
|
||||
.children(if self.project.read(cx).is_disconnected() {
|
||||
Some(DisconnectedOverlay)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue