瀏覽代碼

fix(prejoin) hide skip prejoin for exposed app

j8
Tudor-Ovidiu Avram 4 年之前
父節點
當前提交
f6433668d5
共有 2 個檔案被更改,包括 20 行新增4 行删除
  1. 12
    2
      react/features/prejoin/components/Prejoin.js
  2. 8
    2
      react/features/prejoin/components/PrejoinApp.js

+ 12
- 2
react/features/prejoin/components/Prejoin.js 查看文件

@@ -105,6 +105,11 @@ type Props = {
105 105
      */
106 106
     showDialog: boolean,
107 107
 
108
+    /**
109
+     * Flag signaling the visibility of the skip prejoin toggle
110
+     */
111
+    showSkipPrejoin: boolean,
112
+
108 113
     /**
109 114
      * Used for translation.
110 115
      */
@@ -134,7 +139,8 @@ class Prejoin extends Component<Props, State> {
134 139
      * @static
135 140
      */
136 141
     static defaultProps = {
137
-        showJoinActions: true
142
+        showJoinActions: true,
143
+        showSkipPrejoin: true
138 144
     };
139 145
 
140 146
     /**
@@ -339,7 +345,11 @@ class Prejoin extends Component<Props, State> {
339 345
      * @returns {React$Element}
340 346
      */
341 347
     _renderSkipPrejoinButton() {
342
-        const { buttonIsToggled, t } = this.props;
348
+        const { buttonIsToggled, t, showSkipPrejoin } = this.props;
349
+
350
+        if (!showSkipPrejoin) {
351
+            return null;
352
+        }
343 353
 
344 354
         return (
345 355
             <div className = 'prejoin-checkbox-container'>

+ 8
- 2
react/features/prejoin/components/PrejoinApp.js 查看文件

@@ -21,6 +21,11 @@ type Props = {
21 21
      * Flag signaling the visibility of join label, input and buttons
22 22
      */
23 23
     showJoinActions: boolean,
24
+
25
+    /**
26
+     * Flag signaling the visibility of the skip prejoin toggle
27
+     */
28
+    showSkipPrejoin: boolean,
24 29
 };
25 30
 
26 31
 /**
@@ -42,13 +47,14 @@ export default class PrejoinApp extends BaseApp<Props> {
42 47
         this._init.then(async () => {
43 48
             const { store } = this.state;
44 49
             const { dispatch } = store;
45
-            const { showAvatar, showJoinActions } = this.props;
50
+            const { showAvatar, showJoinActions, showSkipPrejoin } = this.props;
46 51
 
47 52
             super._navigate({
48 53
                 component: Prejoin,
49 54
                 props: {
50 55
                     showAvatar,
51
-                    showJoinActions
56
+                    showJoinActions,
57
+                    showSkipPrejoin
52 58
                 }
53 59
             });
54 60
 

Loading…
取消
儲存