Basic call link join support
This commit is contained in:
parent
2bfb6e7481
commit
96b3413feb
75 changed files with 2438 additions and 509 deletions
|
@ -3,27 +3,46 @@
|
|||
|
||||
import React from 'react';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { CallMode } from '../types/Calling';
|
||||
|
||||
export type PropsType = {
|
||||
callMode: CallMode;
|
||||
i18n: LocalizerType;
|
||||
isAdhocJoinRequestPending?: boolean;
|
||||
groupMemberCount?: number;
|
||||
participantCount: number;
|
||||
toggleParticipants: () => void;
|
||||
};
|
||||
|
||||
export function CallParticipantCount({
|
||||
callMode,
|
||||
i18n,
|
||||
isAdhocJoinRequestPending,
|
||||
groupMemberCount,
|
||||
participantCount,
|
||||
toggleParticipants,
|
||||
}: PropsType): JSX.Element {
|
||||
const isToggleVisible =
|
||||
Boolean(participantCount) || callMode === CallMode.Adhoc;
|
||||
const count = participantCount || groupMemberCount || 1;
|
||||
const innerText = i18n('icu:CallControls__InfoDisplay--participants', {
|
||||
count: String(count),
|
||||
});
|
||||
let innerText: string | undefined;
|
||||
if (callMode === CallMode.Adhoc) {
|
||||
if (isAdhocJoinRequestPending) {
|
||||
innerText = i18n(
|
||||
'icu:CallControls__InfoDisplay--adhoc-join-request-pending'
|
||||
);
|
||||
} else if (!participantCount) {
|
||||
innerText = i18n('icu:CallControls__InfoDisplay--adhoc-call');
|
||||
}
|
||||
}
|
||||
if (!innerText) {
|
||||
innerText = i18n('icu:CallControls__InfoDisplay--participants', {
|
||||
count: String(count),
|
||||
});
|
||||
}
|
||||
|
||||
// Call not started, can't click to show participants
|
||||
if (!participantCount) {
|
||||
if (!isToggleVisible) {
|
||||
return (
|
||||
<span
|
||||
aria-label={i18n('icu:calling__participants', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue