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(native-participants-pane) added showHeaderWithNavigation prop to JitsiModal and created close button
Calin Chitu6597bfc2aae0
diff --git a/react/features/base/modal/components/JitsiModal.js b/react/features/base/modal/components/JitsiModal.jsindex e489fdb35f..d61cc86e78 100644--- a/react/features/base/modal/components/JitsiModal.js+++ b/react/features/base/modal/components/JitsiModal.js@@ -66,6 +66,11 @@ type Props = {*/position?: string,+ /**+ * True if the header with navigation should be shown, false otherwise.+ */+ showHeaderWithNavigation: boolean,+/*** Additional style to be appended to the View containing the content of the modal.*/@@ -98,7 +103,17 @@ class JitsiModal extends PureComponent<Props> {* @inheritdoc*/render() {- const { _headerStyles, _show, _styles, children, footerComponent, headerProps, position, style } = this.props;+ const {+ _headerStyles,+ _show,+ _styles,+ children,+ footerComponent,+ headerProps,+ position,+ showHeaderWithNavigation,+ style+ } = this.props;return (<SlidingView@@ -117,9 +132,10 @@ class JitsiModal extends PureComponent<Props> {_styles.page,style] }>- <HeaderWithNavigation+ {showHeaderWithNavigation+ && <HeaderWithNavigation{ ...headerProps }- onPressBack = { this._onRequestClose } />+ onPressBack = { this._onRequestClose } />}<SafeAreaView style = { styles.safeArea }>{ children }</SafeAreaView>diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.jsindex b1159a5c98..39e232cc37 100644--- a/react/features/chat/components/native/Chat.js+++ b/react/features/chat/components/native/Chat.js@@ -44,7 +44,8 @@ class Chat extends AbstractChat<Props> {headerLabelKey: 'chat.title'}}modalId = { CHAT_VIEW_MODAL_ID }- onClose = { this._onClose }>+ onClose = { this._onClose }+ showHeaderWithNavigation = { true }><MessageContainer messages = { this.props._messages } /><MessageRecipient />diff --git a/react/features/etherpad/components/native/SharedDocument.js b/react/features/etherpad/components/native/SharedDocument.jsindex 11cdf07b97..a191d7bd73 100644--- a/react/features/etherpad/components/native/SharedDocument.js+++ b/react/features/etherpad/components/native/SharedDocument.js@@ -78,6 +78,7 @@ class SharedDocument extends PureComponent<Props> {headerLabelKey: 'documentSharing.title'}}modalId = { SHARE_DOCUMENT_VIEW_ID }+ showHeaderWithNavigation = { true }style = { styles.webView }><WebViewonError = { this._onError }diff --git a/react/features/help/components/HelpView.js b/react/features/help/components/HelpView.jsindex c3a4fcadc3..390e3b0b86 100644--- a/react/features/help/components/HelpView.js+++ b/react/features/help/components/HelpView.js@@ -33,7 +33,8 @@ class HelpView extends PureComponent<Props> {headerProps = {{headerLabelKey: 'helpView.header'}}- modalId = { HELP_VIEW_MODAL_ID }>+ modalId = { HELP_VIEW_MODAL_ID }+ showHeaderWithNavigation = { true }><WebView source = {{ uri: this.props._url }} /></JitsiModal>);diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.jsindex c03313d071..b53ba43380 100644--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js@@ -176,7 +176,8 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {headerLabelKey: 'inviteDialog.header',onPressForward: this._onInvite}}- modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }>+ modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }+ showHeaderWithNavigation = { true }><Viewstyle = { styles.searchFieldWrapper }><View style = { styles.searchIconWrapper }>diff --git a/react/features/invite/components/dial-in-summary/native/DialInSummary.js b/react/features/invite/components/dial-in-summary/native/DialInSummary.jsindex a847f3d664..0f4825240f 100644--- a/react/features/invite/components/dial-in-summary/native/DialInSummary.js+++ b/react/features/invite/components/dial-in-summary/native/DialInSummary.js@@ -58,7 +58,8 @@ class DialInSummary extends Component<Props> {headerLabelKey: 'info.label'}}modalId = { DIAL_IN_SUMMARY_VIEW_ID }- style = { styles.backDrop } >+ showHeaderWithNavigation = { true }+ style = { styles.backDrop }><WebViewonError = { this._onError }onShouldStartLoadWithRequest = { this._onNavigate }diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.jsindex 80bf4c6816..661bf9a740 100644--- a/react/features/participants-pane/components/native/ParticipantsPane.js+++ b/react/features/participants-pane/components/native/ParticipantsPane.js@@ -1,14 +1,17 @@// @flowimport React, { useCallback } from 'react';-import { Button, Text, withTheme } from 'react-native-paper';+import { Button, withTheme } from 'react-native-paper';import { useDispatch } from 'react-redux';import { translate } from '../../../base/i18n';+import { Icon, IconClose } from '../../../base/icons';import { JitsiModal } from '../../../base/modal';import { close } from '../../actions';+import styles from './styles';+/*** {@code ParticipantsPane}'s React {@code Component} prop types.*/@@ -31,16 +34,25 @@ function ParticipantsPane({ theme }: Props) {() => dispatch(close()),[ dispatch ]);+ const { palette } = theme;+return (<JitsiModal- headerProps = {{- onPressBack: closePane()- }}>- {/* eslint-disable-next-line react/jsx-no-bind */}- <Button onPress = { closePane }> X</Button>- <Text>- OLE- </Text>+ showHeaderWithNavigation = { false }+ style = { styles.participantsPane }>+ <Button+ mode = 'contained'+ onPress = { closePane }+ style = { styles.closeButton }+ theme = {{+ colors: {+ primary: palette.action02+ }+ }}>+ <Icon+ src = { IconClose }+ style = { styles.closeIcon } />+ </Button></JitsiModal>);}diff --git a/react/features/participants-pane/components/native/styles.js b/react/features/participants-pane/components/native/styles.jsnew file mode 100644index 0000000000..9e3f3c7525--- /dev/null+++ b/react/features/participants-pane/components/native/styles.js@@ -0,0 +1,26 @@+import BaseTheme from '../../../base/ui/components/BaseTheme.native';++/**+ * The styles of the native components of the feature {@code participants}.+ */+export default {+ participantsPane: {+ backgroundColor: BaseTheme.palette.ui01,+ padding: 16+ },++ closeButton: {+ alignItems: 'center',+ display: 'flex',+ height: 48,+ justifyContent: 'center',+ marginLeft: 'auto'+ },++ closeIcon: {+ display: 'flex',+ flex: 1,+ fontSize: 24,+ justifyContent: 'center'+ }+};diff --git a/react/features/settings/components/native/SettingsView.js b/react/features/settings/components/native/SettingsView.jsindex 89901a373a..1899e38ca6 100644--- a/react/features/settings/components/native/SettingsView.js+++ b/react/features/settings/components/native/SettingsView.js@@ -158,7 +158,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {headerLabelKey: 'settingsView.header'}}modalId = { SETTINGS_VIEW_ID }- onClose = { this._onClose }>+ onClose = { this._onClose }+ showHeaderWithNavigation = { true }><ScrollView><FormSectionAccordionaccordion = { false }