Messaging · Calls: controls, tiles, a grid, a shared screen, a bar, a ringing dialog, a huddle
CallControls holds the microphone, camera and a shared screen as toggles, then Leave. ParticipantTile shows a camera's frame from the host or the person's initials, their name with a mark when muted, and a ring while they speak. VideoCallGrid lays tiles in even rows as far as they fit across its measured width; a short last row centers at the full rows' width. ScreenShareView names who presents and offers Stop presenting for your own share, the call's tiles beside or below. VoiceCallBar tells where a call is, how long it has run and who is in it, with the microphone and Leave. IncomingCallDialog rings with the caller's picture; Accept or Decline answers each ring once, and Escape declines. HuddleIndicator rings while a huddle is live; a press joins. The recorder's device toggle and the camera's name chip now have one home in media. People: member names sort whatever their case, a status's words save trimmed, and a profile card's local time ticks.
This commit is contained in:
1 parent
dd5e36cd94
commit
dd465fedb7
26 files changed
+1535
-51
No files matched your search
+15
-10
@@ -181,18 +181,23 @@ impl RelativeTime {
|
||||
}
|
||||
}
|
||||
|
||||
/// Redraws the view each tick while `id` stays on screen.
|
||||
pub(crate) fn fresh(id: impl Into<ElementId>, window: &mut Window, cx: &mut App) {
|
||||
window.use_keyed_state(id, cx, |window, cx| -> Task<()> {
|
||||
cx.spawn_in(window, async move |ticker, cx| {
|
||||
loop {
|
||||
cx.background_executor().timer(TICK).await;
|
||||
if ticker.update(cx, |_, cx| cx.notify()).is_err() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
impl RenderOnce for RelativeTime {
|
||||
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
window.use_keyed_state(self.id, cx, |window, cx| -> Task<()> {
|
||||
cx.spawn_in(window, async move |ticker, cx| {
|
||||
loop {
|
||||
cx.background_executor().timer(TICK).await;
|
||||
if ticker.update(cx, |_, cx| cx.notify()).is_err() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
fresh(self.id, window, cx);
|
||||
figure(format::relative(self.at, Timestamp::now()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ pub use emoji::Emoji;
|
||||
pub use fit::{Ellipsis, EllipsisTooltip, MiddleEllipsis};
|
||||
pub(crate) use fit::{LEADING, text_width};
|
||||
pub use format::DurationStyle;
|
||||
pub(crate) use formatted::fresh;
|
||||
pub use formatted::{
|
||||
CurrencyText, DateTimeText, DurationText, FileSizeText, NumberText, PercentText, PluralText,
|
||||
RelativeTime,
|
||||
|
||||
Reference in new issue
Block a user