From d169bd50079aa71e22917da954286d241be45022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Wed, 2 Sep 2020 10:28:22 -0500 Subject: [PATCH] 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. --- config.js | 3 +++ .../connection-stats/components/ConnectionStatsTable.js | 2 +- react/features/lobby/components/native/LobbyModeButton.js | 3 ++- react/features/lobby/components/web/LobbySection.js | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 0228eaf00..b1d853c01 100644 --- a/config.js +++ b/config.js @@ -340,6 +340,9 @@ var config = { // UI // + // Hides lobby button + // hideLobbyButton: false, + // Require users to always specify a display name. // requireDisplayName: true, diff --git a/react/features/connection-stats/components/ConnectionStatsTable.js b/react/features/connection-stats/components/ConnectionStatsTable.js index b8c3bfd77..5a454e978 100644 --- a/react/features/connection-stats/components/ConnectionStatsTable.js +++ b/react/features/connection-stats/components/ConnectionStatsTable.js @@ -226,7 +226,7 @@ class ConnectionStatsTable extends Component { /** * 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} diff --git a/react/features/lobby/components/native/LobbyModeButton.js b/react/features/lobby/components/native/LobbyModeButton.js index 8faeaffa2..97018d2ea 100644 --- a/react/features/lobby/components/native/LobbyModeButton.js +++ b/react/features/lobby/components/native/LobbyModeButton.js @@ -66,11 +66,12 @@ class LobbyModeButton extends AbstractButton { export function _mapStateToProps(state: Object): $Shape { 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 }; } diff --git a/react/features/lobby/components/web/LobbySection.js b/react/features/lobby/components/web/LobbySection.js index 64a66359e..a67d18bf6 100644 --- a/react/features/lobby/components/web/LobbySection.js +++ b/react/features/lobby/components/web/LobbySection.js @@ -132,10 +132,12 @@ class LobbySection extends PureComponent { */ function mapStateToProps(state: Object): $Shape { 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 }; }