Skip to content

Commit

Permalink
add user to active call
Browse files Browse the repository at this point in the history
  • Loading branch information
Flemmli97 committed Nov 14, 2023
1 parent 7cdd46e commit 1e652c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ui/src/components/media/calling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ fn ActiveCallControl(cx: Scope<ActiveCallProps>) -> Element {
let participants = state.read().get_identities(&call.participants_joined);
let other_participants = state.read().remove_self(&participants);
let participants_name = State::join_usernames(&other_participants);
let self_id = build_user_from_identity(&state.read().get_own_identity());

use_effect(cx, &other_participants, |in_call| {
to_owned![ch, state];
Expand Down Expand Up @@ -400,7 +401,15 @@ fn ActiveCallControl(cx: Scope<ActiveCallProps>) -> Element {
class: format_args!("call-time {}", if cx.props.in_chat {"in-chat"} else {""}),
aria_label: "call-time",
format_timestamp_timeago(active_call.answer_time.into(), &state.read().settings.language_id()),
}
},
cx.props.in_chat.then(||rsx!(div {
class: "self-identity",
UserImage {
platform: self_id.platform,
status: self_id.status,
image: self_id.photo
}
}))
},
div {
class: "controls",
Expand Down Expand Up @@ -643,7 +652,7 @@ pub fn CallDialog<'a>(cx: Scope<'a, CallDialogProps<'a>>) -> Element<'a> {
)
p {
"{cx.props.description}",
}
},
},
div {
class: "calling",
Expand Down
4 changes: 4 additions & 0 deletions ui/src/components/media/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@
bottom: var(--padding);
}
}
.self-identity {
position: absolute;
bottom: var(--padding-less);
}
.controls {
display: inline-flex;
gap: var(--gap);
Expand Down

0 comments on commit 1e652c0

Please sign in to comment.