Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(speakerstats): Shows a tooltip for participants count.
damencho4c37e0d7618b
diff --git a/lang/main.json b/lang/main.jsonindex 0175c6881f..f165105537 100644--- a/lang/main.json+++ b/lang/main.json@@ -1183,6 +1183,7 @@"fearful": "Fearful","happy": "Happy","hours": "{{count}}h",+ "labelTooltip": "Number of participants: {{count}}","minutes": "{{count}}m","name": "Name","neutral": "Neutral",diff --git a/react/features/conference/components/web/SpeakerStatsLabel.tsx b/react/features/conference/components/web/SpeakerStatsLabel.tsxindex 62b5460ee4..be02fe126c 100644--- a/react/features/conference/components/web/SpeakerStatsLabel.tsx+++ b/react/features/conference/components/web/SpeakerStatsLabel.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { useDispatch, useSelector } from 'react-redux';import { IReduxState } from '../../../app/types';@@ -7,6 +8,7 @@ import { IconUsers } from '../../../base/icons/svg';import Label from '../../../base/label/components/web/Label';import { COLORS } from '../../../base/label/constants';import { getParticipantCount } from '../../../base/participants/functions';+import Tooltip from '../../../base/tooltip/components/Tooltip';import SpeakerStats from '../../../speaker-stats/components/web/SpeakerStats';import { isSpeakerStatsDisabled } from '../../../speaker-stats/functions';import { iAmVisitor } from '../../../visitors/functions';@@ -23,6 +25,7 @@ function SpeakerStatsLabel() {const iAmVisitorState = useSelector(iAmVisitor);const _isSpeakerStatsDisabled = useSelector(isSpeakerStatsDisabled);const dispatch = useDispatch();+ const { t } = useTranslation();// visitor has hidden its own video and should not count itselfif (iAmVisitorState) {@@ -38,13 +41,17 @@ function SpeakerStatsLabel() {}return (- <Label- color = { COLORS.white }- icon = { IconUsers }- iconColor = '#fff'- // eslint-disable-next-line react/jsx-no-bind- onClick = { onClick }- text = { `${count}` } />+ <Tooltip+ content = { t('speakerStats.labelTooltip', { count }) }+ position = { 'bottom' }>+ <Label+ color = { COLORS.white }+ icon = { IconUsers }+ iconColor = '#fff'+ // eslint-disable-next-line react/jsx-no-bind+ onClick = { onClick }+ text = { `${count}` } />+ </Tooltip>);}