mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-22 15:07:55 +00:00
squash: Implements handling of live conference and queue service.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import { IconUsers } from '../../../base/icons/svg';
|
||||
import Label from '../../../base/label/components/native/Label';
|
||||
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
|
||||
import { getVisitorsShortText, iAmVisitor } from '../../functions';
|
||||
import { getVisitorsShortText, iAmVisitor, isVisitorsLive } from '../../functions';
|
||||
|
||||
const styles = {
|
||||
raisedHandsCountLabel: {
|
||||
@@ -27,13 +28,20 @@ const VisitorsCountLabel = () => {
|
||||
const visitorsMode = useSelector((state: IReduxState) => iAmVisitor(state));
|
||||
const visitorsCount = useSelector((state: IReduxState) =>
|
||||
state['features/visitors'].count || 0);
|
||||
const { t } = useTranslation();
|
||||
const isLive = useSelector(isVisitorsLive);
|
||||
let visitorsWaiting = '';
|
||||
|
||||
if (isLive === false) {
|
||||
visitorsWaiting = t('visitors.waiting');
|
||||
}
|
||||
|
||||
return !visitorsMode && visitorsCount > 0 ? (
|
||||
<Label
|
||||
icon = { IconUsers }
|
||||
iconColor = { BaseTheme.palette.uiBackground }
|
||||
style = { styles.raisedHandsCountLabel }
|
||||
text = { `${getVisitorsShortText(visitorsCount)}` }
|
||||
text = { `${getVisitorsShortText(visitorsCount)} ${visitorsWaiting}` }
|
||||
textStyle = { styles.raisedHandsCountLabelText } />
|
||||
) : null;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* The component that renders visitors queue UI.
|
||||
*
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
export default function VisitorsQueue() {
|
||||
return undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user