浏览代码

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.
master
Дамян Минков 5 年前
父节点
当前提交
d169bd5007
没有帐户链接到提交者的电子邮件

+ 3
- 0
config.js 查看文件

@@ -340,6 +340,9 @@ var config = {
340 340
     // UI
341 341
     //
342 342
 
343
+    // Hides lobby button
344
+    // hideLobbyButton: false,
345
+
343 346
     // Require users to always specify a display name.
344 347
     // requireDisplayName: true,
345 348
 

+ 1
- 1
react/features/connection-stats/components/ConnectionStatsTable.js 查看文件

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

+ 2
- 1
react/features/lobby/components/native/LobbyModeButton.js 查看文件

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

+ 2
- 0
react/features/lobby/components/web/LobbySection.js 查看文件

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

正在加载...
取消
保存