mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 16:27:49 +00:00
* feat(visitors): Allow participants pane button. * feat(visitors): Do not count the local participant when in visitor mode. * feat(visitors): Use same buttons on web and native. * feat(visitors): Always show the visitors count. It was shown only for the main participants. * feat(visitors): Skips showing local in participants pane when visitor.
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { IconUsers } from '../../../base/icons/svg';
|
|
import Label from '../../../base/label/components/native/Label';
|
|
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
|
|
import { getVisitorsCount, getVisitorsShortText } from '../../functions';
|
|
|
|
const styles = {
|
|
raisedHandsCountLabel: {
|
|
alignItems: 'center',
|
|
backgroundColor: BaseTheme.palette.warning02,
|
|
borderRadius: BaseTheme.shape.borderRadius,
|
|
flexDirection: 'row',
|
|
marginLeft: BaseTheme.spacing[0],
|
|
marginBottom: BaseTheme.spacing[0]
|
|
},
|
|
|
|
raisedHandsCountLabelText: {
|
|
color: BaseTheme.palette.uiBackground,
|
|
paddingLeft: BaseTheme.spacing[2]
|
|
}
|
|
};
|
|
|
|
const VisitorsCountLabel = () => {
|
|
const visitorsCount = useSelector(getVisitorsCount);
|
|
|
|
return visitorsCount > 0 ? (
|
|
<Label
|
|
icon = { IconUsers }
|
|
iconColor = { BaseTheme.palette.uiBackground }
|
|
style = { styles.raisedHandsCountLabel }
|
|
text = { `${getVisitorsShortText(visitorsCount)}` }
|
|
textStyle = { styles.raisedHandsCountLabelText } />
|
|
) : null;
|
|
};
|
|
|
|
export default VisitorsCountLabel;
|