Show raise hand status in call participant list
This commit is contained in:
parent
23e3883ce0
commit
52d267f7b8
6 changed files with 76 additions and 51 deletions
|
@ -4335,10 +4335,10 @@ button.module-image__border-overlay:focus {
|
||||||
@include font-body-1;
|
@include font-body-1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
margin-block: 2px;
|
margin-block: 2px;
|
||||||
padding-block: 5px;
|
padding-block: 8px;
|
||||||
padding-inline: 10px;
|
padding-inline-start: 10px;
|
||||||
|
padding-inline-end: 2px;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -4348,8 +4348,9 @@ button.module-image__border-overlay:focus {
|
||||||
|
|
||||||
&__avatar-and-name {
|
&__avatar-and-name {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
min-width: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-width: 172px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
|
@ -4387,12 +4388,19 @@ button.module-image__border-overlay:focus {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__status {
|
&__status-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-basis: 64px;
|
flex: none;
|
||||||
flex-shrink: 0;
|
margin-inline: 8px;
|
||||||
align-items: center;
|
height: 16px;
|
||||||
justify-content: end;
|
width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__hand-raised {
|
||||||
|
@include color-svg(
|
||||||
|
'../images/icons/v3/raise_hand/raise_hand-light.svg',
|
||||||
|
$color-white
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__muted {
|
&__muted {
|
||||||
|
@ -4401,10 +4409,6 @@ button.module-image__border-overlay:focus {
|
||||||
'../images/icons/v3/video/video-slash-compact-light.svg',
|
'../images/icons/v3/video/video-slash-compact-light.svg',
|
||||||
$color-white
|
$color-white
|
||||||
);
|
);
|
||||||
display: inline-block;
|
|
||||||
margin-inline-start: 16px;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&--audio {
|
&--audio {
|
||||||
|
@ -4412,10 +4416,6 @@ button.module-image__border-overlay:focus {
|
||||||
'../images/icons/v3/mic/mic-slash-compact-light.svg',
|
'../images/icons/v3/mic/mic-slash-compact-light.svg',
|
||||||
$color-white
|
$color-white
|
||||||
);
|
);
|
||||||
display: inline-block;
|
|
||||||
margin-inline-start: 16px;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4424,10 +4424,6 @@ button.module-image__border-overlay:focus {
|
||||||
'../images/icons/v3/share_screen/share_screen-fill-light.svg',
|
'../images/icons/v3/share_screen/share_screen-fill-light.svg',
|
||||||
$color-white
|
$color-white
|
||||||
);
|
);
|
||||||
display: inline-block;
|
|
||||||
margin-inline-start: 16px;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,6 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
.CallingRaisedHandsList__AvatarAndName {
|
|
||||||
max-width: 205px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CallingRaisedHandsList__NameHandIcon {
|
.CallingRaisedHandsList__NameHandIcon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
$icon-size: 16px;
|
$icon-size: 16px;
|
||||||
|
@ -90,7 +86,8 @@
|
||||||
|
|
||||||
.CallingRaisedHandsList__LowerMyHandLink {
|
.CallingRaisedHandsList__LowerMyHandLink {
|
||||||
@include button-reset;
|
@include button-reset;
|
||||||
margin-inline-end: 24px;
|
display: flex;
|
||||||
|
margin-inline-end: 16px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: $color-ultramarine-pastel;
|
color: $color-ultramarine-pastel;
|
||||||
|
|
|
@ -324,6 +324,14 @@ function ActiveCallManager({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let isHandRaised = false;
|
||||||
|
if (activeCall.callMode === CallMode.Group) {
|
||||||
|
const { raisedHands, localDemuxId } = activeCall;
|
||||||
|
if (localDemuxId) {
|
||||||
|
isHandRaised = raisedHands.has(localDemuxId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const groupCallParticipantsForParticipantsList =
|
const groupCallParticipantsForParticipantsList =
|
||||||
activeCall.callMode === CallMode.Group
|
activeCall.callMode === CallMode.Group
|
||||||
? [
|
? [
|
||||||
|
@ -337,6 +345,7 @@ function ActiveCallManager({
|
||||||
...me,
|
...me,
|
||||||
hasRemoteAudio: hasLocalAudio,
|
hasRemoteAudio: hasLocalAudio,
|
||||||
hasRemoteVideo: hasLocalVideo,
|
hasRemoteVideo: hasLocalVideo,
|
||||||
|
isHandRaised,
|
||||||
presenting: Boolean(activeCall.presentingSource),
|
presenting: Boolean(activeCall.presentingSource),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -75,6 +75,7 @@ export function ManyParticipants(): JSX.Element {
|
||||||
}),
|
}),
|
||||||
createParticipant({
|
createParticipant({
|
||||||
hasRemoteAudio: true,
|
hasRemoteAudio: true,
|
||||||
|
hasRemoteVideo: true,
|
||||||
presenting: true,
|
presenting: true,
|
||||||
name: 'Rage Trunks',
|
name: 'Rage Trunks',
|
||||||
title: 'Rage Trunks',
|
title: 'Rage Trunks',
|
||||||
|
@ -90,8 +91,18 @@ export function ManyParticipants(): JSX.Element {
|
||||||
title: 'Goku Black',
|
title: 'Goku Black',
|
||||||
}),
|
}),
|
||||||
createParticipant({
|
createParticipant({
|
||||||
|
isHandRaised: true,
|
||||||
title: 'Supreme Kai Zamasu',
|
title: 'Supreme Kai Zamasu',
|
||||||
}),
|
}),
|
||||||
|
createParticipant({
|
||||||
|
hasRemoteAudio: false,
|
||||||
|
hasRemoteVideo: true,
|
||||||
|
isHandRaised: true,
|
||||||
|
title: 'Chi Chi',
|
||||||
|
}),
|
||||||
|
createParticipant({
|
||||||
|
title: 'Someone With A Really Long Name',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
return <CallingParticipantsList {...props} />;
|
return <CallingParticipantsList {...props} />;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import FocusTrap from 'focus-trap-react';
|
import FocusTrap from 'focus-trap-react';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import { Avatar, AvatarSize } from './Avatar';
|
import { Avatar, AvatarSize } from './Avatar';
|
||||||
import { ContactName } from './conversation/ContactName';
|
import { ContactName } from './conversation/ContactName';
|
||||||
|
@ -20,6 +21,7 @@ import { ModalContainerContext } from './ModalHost';
|
||||||
type ParticipantType = ConversationType & {
|
type ParticipantType = ConversationType & {
|
||||||
hasRemoteAudio?: boolean;
|
hasRemoteAudio?: boolean;
|
||||||
hasRemoteVideo?: boolean;
|
hasRemoteVideo?: boolean;
|
||||||
|
isHandRaised?: boolean;
|
||||||
presenting?: boolean;
|
presenting?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,17 +148,29 @@ export const CallingParticipantsList = React.memo(
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="module-calling-participants-list__status">
|
<span
|
||||||
{participant.hasRemoteVideo === false ? (
|
className={classNames(
|
||||||
<span className="module-calling-participants-list__muted--video" />
|
'module-calling-participants-list__status-icon',
|
||||||
) : null}
|
participant.isHandRaised &&
|
||||||
{participant.presenting ? (
|
'module-calling-participants-list__hand-raised'
|
||||||
<span className="module-calling-participants-list__presenting" />
|
)}
|
||||||
) : null}
|
/>
|
||||||
{participant.hasRemoteAudio === false ? (
|
<span
|
||||||
<span className="module-calling-participants-list__muted--audio" />
|
className={classNames(
|
||||||
) : null}
|
'module-calling-participants-list__status-icon',
|
||||||
</div>
|
participant.presenting &&
|
||||||
|
'module-calling-participants-list__presenting',
|
||||||
|
!participant.hasRemoteVideo &&
|
||||||
|
'module-calling-participants-list__muted--video'
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className={classNames(
|
||||||
|
'module-calling-participants-list__status-icon',
|
||||||
|
!participant.hasRemoteAudio &&
|
||||||
|
'module-calling-participants-list__muted--audio'
|
||||||
|
)}
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -114,20 +114,18 @@ export function CallingRaisedHandsList({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="module-calling-participants-list__status">
|
{localHandRaised &&
|
||||||
{localHandRaised &&
|
ourServiceId &&
|
||||||
ourServiceId &&
|
participant.serviceId === ourServiceId && (
|
||||||
participant.serviceId === ourServiceId && (
|
<button
|
||||||
<button
|
className="CallingRaisedHandsList__LowerMyHandLink"
|
||||||
className="CallingRaisedHandsList__LowerMyHandLink"
|
type="button"
|
||||||
type="button"
|
onClick={onLowerMyHand}
|
||||||
onClick={onLowerMyHand}
|
>
|
||||||
>
|
{i18n('icu:CallControls__RaiseHands--lower')}
|
||||||
{i18n('icu:CallControls__RaiseHands--lower')}
|
</button>
|
||||||
</button>
|
)}
|
||||||
)}
|
<div className="module-calling-participants-list__status-icon CallingRaisedHandsList__NameHandIcon" />
|
||||||
<div className="CallingRaisedHandsList__NameHandIcon" />
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue