feat: Adds interface config to hide lobby button. (#7619)

* feat: Adds interface config to hide lobby button.

* squash: Moves the config to config.js and add it to mobile.
This commit is contained in:
Дамян Минков 2020-09-02 10:28:22 -05:00 committed by GitHub
parent ac17db9df5
commit d169bd5007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -340,6 +340,9 @@ var config = {
// UI
//
// Hides lobby button
// hideLobbyButton: false,
// Require users to always specify a display name.
// requireDisplayName: true,

View File

@ -226,7 +226,7 @@ class ConnectionStatsTable extends Component<Props> {
/**
* Creates a a table row as a ReactElement for displaying codec, if present.
* This will typically be something like "Codecs (A/V): opus, vp8".
* This will typically be something like "Codecs (A/V): Opus, vp8".
*
* @private
* @returns {ReactElement}

View File

@ -66,11 +66,12 @@ class LobbyModeButton extends AbstractButton<Props, any> {
export function _mapStateToProps(state: Object): $Shape<Props> {
const conference = getCurrentConference(state);
const { lobbyEnabled } = state['features/lobby'];
const { hideLobbyButton } = state['features/base/config'];
const lobbySupported = conference && conference.isLobbySupported();
return {
lobbyEnabled,
visible: lobbySupported && isLocalParticipantModerator(state)
visible: lobbySupported && isLocalParticipantModerator(state) && !hideLobbyButton
};
}

View File

@ -132,10 +132,12 @@ class LobbySection extends PureComponent<Props, State> {
*/
function mapStateToProps(state: Object): $Shape<Props> {
const { conference } = state['features/base/conference'];
const { hideLobbyButton } = state['features/base/config'];
return {
_lobbyEnabled: state['features/lobby'].lobbyEnabled,
_visible: conference && conference.isLobbySupported() && isLocalParticipantModerator(state)
&& !hideLobbyButton
};
}