From 487da8f231192189c2b5636313daa798a6b618eb Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Tue, 22 Jun 2021 20:07:57 +0300 Subject: [PATCH] fix(lobby) disable invite from lobby screen fix #9209 (#9417) * fix(lobby) disable invite from lobby screen fix #9209 * fix(lobby) destructered props fix #9209 * fix(lobby) changed const name fix #9209 * fix(lobby) added empty line fix #9209 --- .../components/web/PreMeetingScreen.js | 19 +++++++++++++++++-- .../lobby/components/AbstractLobbyScreen.js | 12 +++++++++++- .../lobby/components/web/LobbyScreen.js | 6 +++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/react/features/base/premeeting/components/web/PreMeetingScreen.js b/react/features/base/premeeting/components/web/PreMeetingScreen.js index a718d1d74..47a7d2e76 100644 --- a/react/features/base/premeeting/components/web/PreMeetingScreen.js +++ b/react/features/base/premeeting/components/web/PreMeetingScreen.js @@ -29,6 +29,11 @@ type Props = { */ name?: string, + /** + * Indicates whether the copy url button should be shown + */ + showCopyUrlButton: boolean, + /** * Indicates whether the avatar should be shown when video is off */ @@ -77,6 +82,7 @@ export default class PreMeetingScreen extends PureComponent { */ static defaultProps = { showAvatar: true, + showCopyUrlButton: true, showConferenceInfo: true }; @@ -86,8 +92,17 @@ export default class PreMeetingScreen extends PureComponent { * @inheritdoc */ render() { - const { name, showAvatar, showConferenceInfo, title, videoMuted, videoTrack, visibleButtons } = this.props; - const showSharingButton = allowUrlSharing(); + const { + name, + showAvatar, + showConferenceInfo, + showCopyUrlButton, + title, + videoMuted, + videoTrack, + visibleButtons + } = this.props; + const showSharingButton = allowUrlSharing() && showCopyUrlButton; return (
extends PureComponent export function _mapStateToProps(state: Object): $Shape { const localParticipant = getLocalParticipant(state); const participantId = localParticipant?.id; + const inviteEnabledFlag = getFeatureFlag(state, INVITE_ENABLED, true); + const { disableInviteFunctions } = state['features/base/config']; const { knocking, passwordJoinFailed } = state['features/lobby']; const { iAmSipGateway } = state['features/base/config']; + const showCopyUrlButton = inviteEnabledFlag || !disableInviteFunctions; return { _knocking: knocking, @@ -379,6 +388,7 @@ export function _mapStateToProps(state: Object): $Shape { _participantId: participantId, _participantName: localParticipant?.name, _passwordJoinFailed: passwordJoinFailed, - _renderPassword: !iAmSipGateway + _renderPassword: !iAmSipGateway, + showCopyUrlButton }; } diff --git a/react/features/lobby/components/web/LobbyScreen.js b/react/features/lobby/components/web/LobbyScreen.js index 7a4ee5792..7d796f23d 100644 --- a/react/features/lobby/components/web/LobbyScreen.js +++ b/react/features/lobby/components/web/LobbyScreen.js @@ -20,8 +20,12 @@ class LobbyScreen extends AbstractLobbyScreen { * @inheritdoc */ render() { + const { showCopyUrlButton, t } = this.props; + return ( - + { this._renderContent() } );