feat(participants/native) - updated container styles
This commit is contained in:
parent
3fcfb64338
commit
8d737adc65
|
@ -31,7 +31,7 @@ type Props = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const CollapsibleList = ({ children, containerStyle, onLongPress, title }: Props) => {
|
const CollapsibleList = ({ children, containerStyle, onLongPress, title }: Props) => {
|
||||||
const [ collapsed, setCollapsed ] = useState(true);
|
const [ collapsed, setCollapsed ] = useState(false);
|
||||||
const _toggleCollapsed = useCallback(() => {
|
const _toggleCollapsed = useCallback(() => {
|
||||||
setCollapsed(!collapsed);
|
setCollapsed(!collapsed);
|
||||||
}, [ collapsed ]);
|
}, [ collapsed ]);
|
||||||
|
|
|
@ -50,11 +50,21 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_sortedRemoteParticipants: Map<string, string>,
|
_sortedRemoteParticipants: Map<string, string>,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of breakout rooms that were created.
|
||||||
|
*/
|
||||||
|
breakoutRooms: Array,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The redux dispatch function.
|
* The redux dispatch function.
|
||||||
*/
|
*/
|
||||||
dispatch: Function,
|
dispatch: Function,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of participants waiting in lobby.
|
||||||
|
*/
|
||||||
|
lobbyParticipants: Array,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Participants search string.
|
* Participants search string.
|
||||||
*/
|
*/
|
||||||
|
@ -180,6 +190,8 @@ class MeetingParticipantList extends PureComponent<Props> {
|
||||||
_participantsCount,
|
_participantsCount,
|
||||||
_showInviteButton,
|
_showInviteButton,
|
||||||
_sortedRemoteParticipants,
|
_sortedRemoteParticipants,
|
||||||
|
breakoutRooms,
|
||||||
|
lobbyParticipants,
|
||||||
t
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const title = _currentRoom?.name
|
const title = _currentRoom?.name
|
||||||
|
@ -192,12 +204,19 @@ class MeetingParticipantList extends PureComponent<Props> {
|
||||||
// Regarding the fact that we have 3 sections, we apply
|
// Regarding the fact that we have 3 sections, we apply
|
||||||
// a certain height percentage for every section in order for all to fit
|
// a certain height percentage for every section in order for all to fit
|
||||||
// inside the participants pane container
|
// inside the participants pane container
|
||||||
|
// If there are only meeting participants available,
|
||||||
|
// we take the full container height
|
||||||
|
const onlyMeetingParticipants
|
||||||
|
= breakoutRooms.length === 0 && lobbyParticipants.length === 0;
|
||||||
const containerStyle
|
const containerStyle
|
||||||
= _participantsCount > 3 && styles.meetingListContainer;
|
= onlyMeetingParticipants
|
||||||
|
? styles.meetingListFullContainer : styles.meetingListContainer;
|
||||||
|
const finalContainerStyle
|
||||||
|
= _participantsCount > 3 && containerStyle;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CollapsibleList
|
<CollapsibleList
|
||||||
containerStyle = { containerStyle }
|
containerStyle = { finalContainerStyle }
|
||||||
title = { title } >
|
title = { title } >
|
||||||
{
|
{
|
||||||
_showInviteButton
|
_showInviteButton
|
||||||
|
|
|
@ -19,6 +19,10 @@ import {
|
||||||
getCurrentRoomId,
|
getCurrentRoomId,
|
||||||
isInBreakoutRoom
|
isInBreakoutRoom
|
||||||
} from '../../../breakout-rooms/functions';
|
} from '../../../breakout-rooms/functions';
|
||||||
|
import {
|
||||||
|
getKnockingParticipants,
|
||||||
|
getLobbyEnabled
|
||||||
|
} from '../../../lobby/functions';
|
||||||
import MuteEveryoneDialog
|
import MuteEveryoneDialog
|
||||||
from '../../../video-menu/components/native/MuteEveryoneDialog';
|
from '../../../video-menu/components/native/MuteEveryoneDialog';
|
||||||
import {
|
import {
|
||||||
|
@ -63,11 +67,15 @@ const ParticipantsPane = () => {
|
||||||
&& participantsCount > 2 && rooms.length > 1;
|
&& participantsCount > 2 && rooms.length > 1;
|
||||||
const addBreakoutRoom
|
const addBreakoutRoom
|
||||||
= _isBreakoutRoomsSupported && !hideAddRoomButton && isLocalModerator;
|
= _isBreakoutRoomsSupported && !hideAddRoomButton && isLocalModerator;
|
||||||
|
const lobbyEnabled = useSelector(getLobbyEnabled);
|
||||||
|
const lobbyParticipants = useSelector(getKnockingParticipants);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<JitsiScreen style = { styles.participantsPaneContainer }>
|
<JitsiScreen style = { styles.participantsPaneContainer }>
|
||||||
<LobbyParticipantList />
|
<LobbyParticipantList />
|
||||||
<MeetingParticipantList
|
<MeetingParticipantList
|
||||||
|
breakoutRooms = { _isBreakoutRoomsSupported && rooms }
|
||||||
|
lobbyParticipants = { lobbyEnabled && lobbyParticipants }
|
||||||
searchString = { searchString }
|
searchString = { searchString }
|
||||||
setSearchString = { setSearchString } />
|
setSearchString = { setSearchString } />
|
||||||
{
|
{
|
||||||
|
|
|
@ -196,7 +196,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
lobbyListContent: {
|
lobbyListContent: {
|
||||||
height: '20%'
|
height: '16%'
|
||||||
},
|
},
|
||||||
|
|
||||||
lobbyListDescription: {
|
lobbyListDescription: {
|
||||||
|
@ -217,7 +217,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
meetingListContainer: {
|
meetingListContainer: {
|
||||||
height: '60%'
|
height: '56%'
|
||||||
|
},
|
||||||
|
|
||||||
|
meetingListFullContainer: {
|
||||||
|
height: '82%'
|
||||||
},
|
},
|
||||||
|
|
||||||
meetingListDescription: {
|
meetingListDescription: {
|
||||||
|
|
Loading…
Reference in New Issue