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(participants-pane) hide admit all if less than 2 participants
Calinteodorefc5c9dabed5
diff --git a/react/features/participants-pane/components/native/LobbyParticipantList.js b/react/features/participants-pane/components/native/LobbyParticipantList.jsindex fe935ac49a..2e37651742 100644--- a/react/features/participants-pane/components/native/LobbyParticipantList.js+++ b/react/features/participants-pane/components/native/LobbyParticipantList.js@@ -3,7 +3,7 @@import React, { useCallback } from 'react';import { useTranslation } from 'react-i18next';import { Text, View } from 'react-native';-import { Button } from 'react-native-paper';+import { Button, withTheme } from 'react-native-paper';import { useDispatch, useSelector } from 'react-redux';import { admitMultiple } from '../../../lobby/actions.native';@@ -12,17 +12,25 @@ import { getLobbyState } from '../../../lobby/functions';import { LobbyParticipantItem } from './LobbyParticipantItem';import styles from './styles';-export const LobbyParticipantList = () => {+type Props = {++ /**+ * Theme used for styles.+ */+ theme: Object+};++const LobbyParticipantList = ({ theme }: Props) => {const {lobbyEnabled,knockingParticipants: participants} = useSelector(getLobbyState);-const dispatch = useDispatch();const admitAll = useCallback(() =>dispatch(admitMultiple(participants)),- [ dispatch ]);+ [ dispatch, participants ]);const { t } = useTranslation();+ const { palette } = theme;if (!lobbyEnabled || !participants.length) {return null;@@ -35,14 +43,17 @@ export const LobbyParticipantList = () => {{t('participantsPane.headings.waitingLobby',{ count: participants.length })}</Text>- <Button- color = '#3D3D3D'- labelStyle = { styles.admitAllParticipantsActionButtonLabel }- mode = 'text'- onPress = { admitAll }- style = { styles.admitAllParticipantsActionButton }>- {t('lobby.admitAll')}- </Button>+ {+ participants.length > 1 && (+ <Button+ color = { palette.action02 }+ labelStyle = { styles.admitAllParticipantsActionButtonLabel }+ mode = 'text'+ onPress = { admitAll }>+ {t('lobby.admitAll')}+ </Button>+ )+ }</View>{participants.map(p => (@@ -54,3 +65,5 @@ export const LobbyParticipantList = () => {</View>);};++export default withTheme(LobbyParticipantList);diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.jsindex 9c07e636e0..76e53562cf 100644--- a/react/features/participants-pane/components/native/ParticipantsPane.js+++ b/react/features/participants-pane/components/native/ParticipantsPane.js@@ -18,7 +18,7 @@ import MuteEveryoneDialogimport { close } from '../../actions.native';import { ContextMenuMore } from './ContextMenuMore';-import { LobbyParticipantList } from './LobbyParticipantList';+import LobbyParticipantList from './LobbyParticipantList';import { MeetingParticipantList } from './MeetingParticipantList';import styles from './styles';diff --git a/react/features/participants-pane/components/native/styles.js b/react/features/participants-pane/components/native/styles.jsindex 2ae30d1779..589318ad16 100644--- a/react/features/participants-pane/components/native/styles.js+++ b/react/features/participants-pane/components/native/styles.js@@ -116,10 +116,6 @@ export default {textTransform: 'capitalize'},- admitAllParticipantsActionButton: {- marginLeft: 'auto'- },-participantContainer: {alignItems: 'center',borderBottomColor: BaseTheme.palette.field01Hover,diff --git a/react/features/participants-pane/components/web/LobbyParticipantList.js b/react/features/participants-pane/components/web/LobbyParticipantList.jsindex bad4365ce8..2a5afc63fd 100644--- a/react/features/participants-pane/components/web/LobbyParticipantList.js+++ b/react/features/participants-pane/components/web/LobbyParticipantList.js@@ -53,9 +53,13 @@ export const LobbyParticipantList = () => {<div className = { classes.heading }>{t('participantsPane.headings.lobby', { count: participants.length })}</div>- <div- className = { classes.link }- onClick = { admitAll }>{t('lobby.admitAll')}</div>+ {+ participants.length > 1 && (+ <div+ className = { classes.link }+ onClick = { admitAll }>{t('lobby.admitAll')}</div>+ )+ }</div><div>{participants.map(p => (