talkers (#8158)
Release Notes: - Added an "Unmute" action for guests in calls. This lets them use the mic, but not edit projects.
This commit is contained in:
parent
fa2c92d190
commit
c6826a61a0
14 changed files with 225 additions and 67 deletions
|
@ -187,9 +187,10 @@ impl Render for CollabTitlebarItem {
|
|||
let is_muted = room.is_muted();
|
||||
let is_deafened = room.is_deafened().unwrap_or(false);
|
||||
let is_screen_sharing = room.is_screen_sharing();
|
||||
let read_only = room.read_only();
|
||||
let can_use_microphone = room.can_use_microphone();
|
||||
let can_share_projects = room.can_share_projects();
|
||||
|
||||
this.when(is_local && !read_only, |this| {
|
||||
this.when(is_local && can_share_projects, |this| {
|
||||
this.child(
|
||||
Button::new(
|
||||
"toggle_sharing",
|
||||
|
@ -235,7 +236,7 @@ impl Render for CollabTitlebarItem {
|
|||
)
|
||||
.pr_2(),
|
||||
)
|
||||
.when(!read_only, |this| {
|
||||
.when(can_use_microphone, |this| {
|
||||
this.child(
|
||||
IconButton::new(
|
||||
"mute-microphone",
|
||||
|
@ -276,7 +277,7 @@ impl Render for CollabTitlebarItem {
|
|||
.icon_size(IconSize::Small)
|
||||
.selected(is_deafened)
|
||||
.tooltip(move |cx| {
|
||||
if !read_only {
|
||||
if can_use_microphone {
|
||||
Tooltip::with_meta(
|
||||
"Deafen Audio",
|
||||
None,
|
||||
|
@ -289,7 +290,7 @@ impl Render for CollabTitlebarItem {
|
|||
})
|
||||
.on_click(move |_, cx| crate::toggle_deafen(&Default::default(), cx)),
|
||||
)
|
||||
.when(!read_only, |this| {
|
||||
.when(can_share_projects, |this| {
|
||||
this.child(
|
||||
IconButton::new("screen-share", ui::IconName::Screen)
|
||||
.style(ButtonStyle::Subtle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue