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.
pull/7621/head jitsi-meet_4983
Дамян Минков 4 years ago committed by GitHub
parent ac17db9df5
commit d169bd5007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      config.js
  2. 2
      react/features/connection-stats/components/ConnectionStatsTable.js
  3. 3
      react/features/lobby/components/native/LobbyModeButton.js
  4. 2
      react/features/lobby/components/web/LobbySection.js

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

@ -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}

@ -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
};
}

@ -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
};
}

Loading…
Cancel
Save