From 48a6472b3bbb1879ea9941db4d43a2a39eeb5dc1 Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Fri, 25 Nov 2022 13:59:45 +0200 Subject: [PATCH] feat(lobby/prejoin/native): style updates (#12615) feat(lobby/prejoin/native): style updates (#12615) --- lang/main.json | 1 - .../components/native/Conference.js | 2 +- .../native/KnockingParticipantList.js | 104 ++++----- .../lobby/components/native/LobbyScreen.js | 96 ++++---- .../lobby/components/native/styles.js | 216 ++++-------------- .../old-client-notification/functions.ts | 1 + .../native/BreakoutRoomParticipantItem.js | 1 - .../components/native/LobbyParticipantItem.js | 29 ++- .../components/native/LobbyParticipantList.js | 4 +- .../native/MeetingParticipantItem.js | 5 - .../components/native/ParticipantItem.js | 12 +- .../components/native/styles.js | 28 ++- .../prejoin/components/native/Prejoin.tsx | 50 ++-- .../prejoin/components/{ => native}/styles.js | 9 +- 14 files changed, 194 insertions(+), 364 deletions(-) rename react/features/prejoin/components/{ => native}/styles.js (93%) diff --git a/lang/main.json b/lang/main.json index eea77a9731..300040a145 100644 --- a/lang/main.json +++ b/lang/main.json @@ -563,7 +563,6 @@ "lobby": { "admit": "Admit", "admitAll": "Admit all", - "allow": "Allow", "backToKnockModeButton": "Ask to join", "chat": "Chat", "dialogTitle": "Lobby mode", diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index 363f72c9f0..15f01fc644 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -462,7 +462,7 @@ class Conference extends AbstractConference { {/* eslint-disable-next-line react/jsx-no-bind */} - {this._renderNotificationsContainer()} + { this._renderNotificationsContainer() } diff --git a/react/features/lobby/components/native/KnockingParticipantList.js b/react/features/lobby/components/native/KnockingParticipantList.js index e8c9aadb88..28f8edd8ee 100644 --- a/react/features/lobby/components/native/KnockingParticipantList.js +++ b/react/features/lobby/components/native/KnockingParticipantList.js @@ -1,21 +1,22 @@ -// @flow - import React, { PureComponent } from 'react'; -import { ScrollView, Text, TouchableOpacity, View } from 'react-native'; +import { View } from 'react-native'; -import { Avatar } from '../../../base/avatar'; -import { translate } from '../../../base/i18n'; -import { isLocalParticipantModerator } from '../../../base/participants'; +import { translate } from '../../../base/i18n/functions'; +import { isLocalParticipantModerator } from '../../../base/participants/functions'; import { connect } from '../../../base/redux'; -import { handleLobbyChatInitialized } from '../../../chat/actions.any'; +import Button from '../../../base/ui/components/native/Button'; +import { BUTTON_TYPES } from '../../../base/ui/constants.native'; +import { handleLobbyChatInitialized } from '../../../chat/actions.native'; import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; -import { setKnockingParticipantApproval } from '../../actions'; -import { HIDDEN_EMAILS } from '../../constants'; +import ParticipantItem + from '../../../participants-pane/components/native/ParticipantItem'; +import { setKnockingParticipantApproval } from '../../actions.native'; import { getKnockingParticipants, getLobbyEnabled, showLobbyChatButton } from '../../functions'; import styles from './styles'; + /** * Props type of the component. */ @@ -44,12 +45,7 @@ export type Props = { /** * The Redux Dispatch function. */ - dispatch: Function, - - /** - * Function to be used to translate i18n labels. - */ - t: Function + dispatch: Function }; /** @@ -74,68 +70,47 @@ class KnockingParticipantList extends PureComponent { * @inheritdoc */ render() { - const { _participants, _visible, _showChatButton, t } = this.props; + const { _participants, _visible, _showChatButton } = this.props; if (!_visible) { return null; } return ( - + <> { _participants.map(p => ( - - - - { p.name } - - { p.email && !HIDDEN_EMAILS.includes(p.email) && ( - - { p.email } - - ) } - - - - { t('lobby.allow') } - - - - - { t('lobby.reject') } - - - {_showChatButton(p) ? ( - - - { t('lobby.chat') } - - - ) : null} + isKnockingParticipant = { true } + key = { p.id } + participantID = { p.id }> +