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) simplified props for hiding header with navigation
Calin Chitu24550777c686
diff --git a/react/features/base/modal/components/JitsiModal.js b/react/features/base/modal/components/JitsiModal.jsindex d61cc86e78..d945ec8fc3 100644--- a/react/features/base/modal/components/JitsiModal.js+++ b/react/features/base/modal/components/JitsiModal.js@@ -50,6 +50,11 @@ type Props = {*/headerProps: Object,+ /**+ * True if the header with navigation should be hidden, false otherwise.+ */+ hideHeaderWithNavigation?: boolean,+/*** The ID of the modal that is being rendered. This is used to show/hide the modal.*/@@ -66,11 +71,6 @@ 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.*/@@ -83,7 +83,8 @@ type Props = {*/class JitsiModal extends PureComponent<Props> {static defaultProps = {- position: 'bottom'+ position: 'bottom',+ hideHeaderWithNavigation: false};/**@@ -111,7 +112,7 @@ class JitsiModal extends PureComponent<Props> {footerComponent,headerProps,position,- showHeaderWithNavigation,+ hideHeaderWithNavigation,style} = this.props;@@ -132,10 +133,10 @@ class JitsiModal extends PureComponent<Props> {_styles.page,style] }>- {showHeaderWithNavigation- && <HeaderWithNavigation+ <HeaderWithNavigation{ ...headerProps }- onPressBack = { this._onRequestClose } />}+ hideHeaderWithNavigation = { hideHeaderWithNavigation }+ onPressBack = { this._onRequestClose } /><SafeAreaView style = { styles.safeArea }>{ children }</SafeAreaView>diff --git a/react/features/base/react/components/native/HeaderWithNavigation.js b/react/features/base/react/components/native/HeaderWithNavigation.jsindex 6619c51f7c..cd2e6e5ba1 100644--- a/react/features/base/react/components/native/HeaderWithNavigation.js+++ b/react/features/base/react/components/native/HeaderWithNavigation.js@@ -27,6 +27,11 @@ type Props = {*/headerLabelKey: ?string,+ /**+ * True if the header with navigation should be hidden, false otherwise.+ */+ hideHeaderWithNavigation?: boolean,+/*** Callback to be invoked on pressing the back button.*/@@ -48,17 +53,22 @@ class HeaderWithNavigation extends Component<Props> {* @inheritdoc*/render() {- const { onPressBack, onPressForward } = this.props;+ const { hideHeaderWithNavigation, onPressBack, onPressForward } = this.props;return (- <Header>- { onPressBack && <BackButton onPress = { onPressBack } /> }- <HeaderLabel labelKey = { this.props.headerLabelKey } />- { onPressForward && <ForwardButton- disabled = { this.props.forwardDisabled }- labelKey = { this.props.forwardLabelKey }- onPress = { onPressForward } /> }- </Header>+ <>+ {+ !hideHeaderWithNavigation+ && <Header>+ { onPressBack && <BackButton onPress = { onPressBack } /> }+ <HeaderLabel labelKey = { this.props.headerLabelKey } />+ { onPressForward && <ForwardButton+ disabled = { this.props.forwardDisabled }+ labelKey = { this.props.forwardLabelKey }+ onPress = { onPressForward } /> }+ </Header>+ }+ </>);}}diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.jsindex 39e232cc37..b1159a5c98 100644--- a/react/features/chat/components/native/Chat.js+++ b/react/features/chat/components/native/Chat.js@@ -44,8 +44,7 @@ class Chat extends AbstractChat<Props> {headerLabelKey: 'chat.title'}}modalId = { CHAT_VIEW_MODAL_ID }- onClose = { this._onClose }- showHeaderWithNavigation = { true }>+ onClose = { this._onClose }><MessageContainer messages = { this.props._messages } /><MessageRecipient />diff --git a/react/features/etherpad/components/native/SharedDocument.js b/react/features/etherpad/components/native/SharedDocument.jsindex a191d7bd73..11cdf07b97 100644--- a/react/features/etherpad/components/native/SharedDocument.js+++ b/react/features/etherpad/components/native/SharedDocument.js@@ -78,7 +78,6 @@ 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 390e3b0b86..c3a4fcadc3 100644--- a/react/features/help/components/HelpView.js+++ b/react/features/help/components/HelpView.js@@ -33,8 +33,7 @@ class HelpView extends PureComponent<Props> {headerProps = {{headerLabelKey: 'helpView.header'}}- modalId = { HELP_VIEW_MODAL_ID }- showHeaderWithNavigation = { true }>+ modalId = { HELP_VIEW_MODAL_ID }><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 b53ba43380..c03313d071 100644--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js@@ -176,8 +176,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {headerLabelKey: 'inviteDialog.header',onPressForward: this._onInvite}}- modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }- showHeaderWithNavigation = { true }>+ modalId = { ADD_PEOPLE_DIALOG_VIEW_ID }><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 0f4825240f..fa87ca9c41 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,6 @@ class DialInSummary extends Component<Props> {headerLabelKey: 'info.label'}}modalId = { DIAL_IN_SUMMARY_VIEW_ID }- showHeaderWithNavigation = { true }style = { styles.backDrop }><WebViewonError = { this._onError }diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.jsindex f48b7a46a3..c1a09aff80 100644--- a/react/features/participants-pane/components/native/ParticipantsPane.js+++ b/react/features/participants-pane/components/native/ParticipantsPane.js@@ -32,7 +32,7 @@ export function ParticipantsPane() {return (<JitsiModal- showHeaderWithNavigation = { false }+ hideHeaderWithNavigation = { true }style = { styles.participantsPane }><View style = { styles.header }><Buttondiff --git a/react/features/settings/components/native/SettingsView.js b/react/features/settings/components/native/SettingsView.jsindex 1899e38ca6..89901a373a 100644--- a/react/features/settings/components/native/SettingsView.js+++ b/react/features/settings/components/native/SettingsView.js@@ -158,8 +158,7 @@ class SettingsView extends AbstractSettingsView<Props, State> {headerLabelKey: 'settingsView.header'}}modalId = { SETTINGS_VIEW_ID }- onClose = { this._onClose }- showHeaderWithNavigation = { true }>+ onClose = { this._onClose }><ScrollView><FormSectionAccordionaccordion = { false }