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:
parent
ac17db9df5
commit
d169bd5007
|
@ -340,6 +340,9 @@ var config = {
|
||||||
// UI
|
// UI
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Hides lobby button
|
||||||
|
// hideLobbyButton: false,
|
||||||
|
|
||||||
// Require users to always specify a display name.
|
// Require users to always specify a display name.
|
||||||
// requireDisplayName: true,
|
// requireDisplayName: true,
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ class ConnectionStatsTable extends Component<Props> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a a table row as a ReactElement for displaying codec, if present.
|
* 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
|
* @private
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
|
|
|
@ -66,11 +66,12 @@ class LobbyModeButton extends AbstractButton<Props, any> {
|
||||||
export function _mapStateToProps(state: Object): $Shape<Props> {
|
export function _mapStateToProps(state: Object): $Shape<Props> {
|
||||||
const conference = getCurrentConference(state);
|
const conference = getCurrentConference(state);
|
||||||
const { lobbyEnabled } = state['features/lobby'];
|
const { lobbyEnabled } = state['features/lobby'];
|
||||||
|
const { hideLobbyButton } = state['features/base/config'];
|
||||||
const lobbySupported = conference && conference.isLobbySupported();
|
const lobbySupported = conference && conference.isLobbySupported();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
lobbyEnabled,
|
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> {
|
function mapStateToProps(state: Object): $Shape<Props> {
|
||||||
const { conference } = state['features/base/conference'];
|
const { conference } = state['features/base/conference'];
|
||||||
|
const { hideLobbyButton } = state['features/base/config'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_lobbyEnabled: state['features/lobby'].lobbyEnabled,
|
_lobbyEnabled: state['features/lobby'].lobbyEnabled,
|
||||||
_visible: conference && conference.isLobbySupported() && isLocalParticipantModerator(state)
|
_visible: conference && conference.isLobbySupported() && isLocalParticipantModerator(state)
|
||||||
|
&& !hideLobbyButton
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue