mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 12:46:07 +00:00
titlebar: show "Share project" button only in local projects. (#3795)
Fixes '"Share" button is shown even for remote projects'. Release Notes: - N/A
This commit is contained in:
parent
1ebfafc03d
commit
ca7e504817
1 changed files with 20 additions and 16 deletions
|
@ -169,11 +169,14 @@ impl Render for CollabTitlebarItem {
|
||||||
.pr_1()
|
.pr_1()
|
||||||
.when_some(room, |this, room| {
|
.when_some(room, |this, room| {
|
||||||
let room = room.read(cx);
|
let room = room.read(cx);
|
||||||
let is_shared = self.project.read(cx).is_shared();
|
let project = self.project.read(cx);
|
||||||
|
let is_local = project.is_local();
|
||||||
|
let is_shared = is_local && project.is_shared();
|
||||||
let is_muted = room.is_muted(cx);
|
let is_muted = room.is_muted(cx);
|
||||||
let is_deafened = room.is_deafened().unwrap_or(false);
|
let is_deafened = room.is_deafened().unwrap_or(false);
|
||||||
let is_screen_sharing = room.is_screen_sharing();
|
let is_screen_sharing = room.is_screen_sharing();
|
||||||
|
|
||||||
|
this.when(is_local, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
Button::new(
|
Button::new(
|
||||||
"toggle_sharing",
|
"toggle_sharing",
|
||||||
|
@ -190,6 +193,7 @@ impl Render for CollabTitlebarItem {
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
|
})
|
||||||
.child(
|
.child(
|
||||||
IconButton::new("leave-call", ui::Icon::Exit)
|
IconButton::new("leave-call", ui::Icon::Exit)
|
||||||
.style(ButtonStyle::Subtle)
|
.style(ButtonStyle::Subtle)
|
||||||
|
|
Loading…
Reference in a new issue