From 5ca3aa593a12b91f505bb1dea04d887f309b704c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 29 Nov 2026 07:02:15 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20empty-room=20join=20voi?= =?UTF-8?q?ce=20is=20the=20primary=20pill=20(filled,=20headphones=20+=20la?= =?UTF-8?q?bel)=20so=20it=20reads=20as=20an=20action,=20not=20a=20member?= =?UTF-8?q?=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/gui/chat.rs | 49 ++++++++++++++++------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/crates/client/src/gui/chat.rs b/crates/client/src/gui/chat.rs index 0e67881..e214c9c 100644 --- a/crates/client/src/gui/chat.rs +++ b/crates/client/src/gui/chat.rs @@ -3225,33 +3225,28 @@ fn members_column( }; let in_call: Vec<&MemberRow> = members.iter().filter(|row| row.in_voice).collect(); let join = (!chat.in_voice(community_id) && yumush.can_join_voice(community_id)).then(|| { - let empty = in_call.is_empty(); - clickable( - "margin_join", - palette, - entity_action(&entity, move |yumush, window, cx| { - yumush.toggle_voice(community_id, window, cx) - }), - ) - .h(px(if empty { size::CONTROL } else { size::CHIP })) - .px(px(if empty { space::SM } else { space::XS })) - .flex() - .items_center() - .gap(px(space::SM)) - .rounded(px(radius::MD)) - .text_color(palette.accent) - .child( - div() - .w(px(if empty { size::ICON } else { size::ICON_SM })) - .flex() - .justify_center() - .child(super::parts::small_icon(IconName::Headphones)), - ) - .child(if empty { - w().chat.join_voice - } else { - w().chat.join - }) + let action = entity_action(&entity, move |yumush, window, cx| { + yumush.toggle_voice(community_id, window, cx) + }); + if in_call.is_empty() { + return super::parts::pill("margin_join", palette.tokens, action) + .self_start() + .gap(px(space::SM)) + .text_color(palette.tokens.ground()) + .font_weight(FontWeight::SEMIBOLD) + .child(super::parts::small_icon(IconName::Headphones)) + .child(w().chat.join_voice); + } + clickable("margin_join", palette, action) + .h(px(size::CHIP)) + .px(px(space::XS)) + .flex() + .items_center() + .gap(px(space::SM)) + .rounded(px(radius::MD)) + .text_color(palette.accent) + .child(super::parts::small_icon(IconName::Headphones)) + .child(w().chat.join) }); let call = if in_call.is_empty() { join.map(|join| div().child(join))