Browse Source

fix(overlay): comments after review

j8
hristoterezov 8 years ago
parent
commit
436bc87a86

+ 20
- 20
react/features/overlay/components/OverlayContainer.js View File

51
         _haveToReload: React.PropTypes.bool,
51
         _haveToReload: React.PropTypes.bool,
52
 
52
 
53
         /**
53
         /**
54
-         * The indicator which determines whether the reload was caused by
55
-         * network failure.
54
+         * The indicator which determines whether the GUM permissions prompt is
55
+         * displayed or not.
56
          *
56
          *
57
-         * NOTE: Used by PageReloadOverlay only.
57
+         * NOTE: Used by UserMediaPermissionsOverlay only.
58
          *
58
          *
59
          * @private
59
          * @private
60
          * @type {boolean}
60
          * @type {boolean}
61
          */
61
          */
62
-        _isNetworkFailure: React.PropTypes.bool,
62
+        _isMediaPermissionPromptVisible: React.PropTypes.bool,
63
 
63
 
64
         /**
64
         /**
65
-         * The indicator which determines whether the GUM permissions prompt is
66
-         * displayed or not.
65
+         * The indicator which determines whether the reload was caused by
66
+         * network failure.
67
          *
67
          *
68
-         * NOTE: Used by UserMediaPermissionsOverlay only.
68
+         * NOTE: Used by PageReloadOverlay only.
69
          *
69
          *
70
          * @private
70
          * @private
71
          * @type {boolean}
71
          * @type {boolean}
72
          */
72
          */
73
-        _mediaPermissionPromptVisible: React.PropTypes.bool,
73
+        _isNetworkFailure: React.PropTypes.bool,
74
 
74
 
75
         /**
75
         /**
76
          * The reason for the error that will cause the reload.
76
          * The reason for the error that will cause the reload.
106
         APP.UI.overlayVisible
106
         APP.UI.overlayVisible
107
             = (this.props._connectionEstablished && this.props._haveToReload)
107
             = (this.props._connectionEstablished && this.props._haveToReload)
108
                 || this.props._suspendDetected
108
                 || this.props._suspendDetected
109
-                || this.props._mediaPermissionPromptVisible;
109
+                || this.props._isMediaPermissionPromptVisible;
110
     }
110
     }
111
 
111
 
112
     /**
112
     /**
131
             );
131
             );
132
         }
132
         }
133
 
133
 
134
-        if (this.props._mediaPermissionPromptVisible) {
134
+        if (this.props._isMediaPermissionPromptVisible) {
135
             return (
135
             return (
136
                 <UserMediaPermissionsOverlay
136
                 <UserMediaPermissionsOverlay
137
                     browser = { this.props._browser } />
137
                     browser = { this.props._browser } />
151
  *     _connectionEstablished: bool,
151
  *     _connectionEstablished: bool,
152
  *     _haveToReload: bool,
152
  *     _haveToReload: bool,
153
  *     _isNetworkFailure: bool,
153
  *     _isNetworkFailure: bool,
154
- *     _mediaPermissionPromptVisible: bool,
154
+ *     _isMediaPermissionPromptVisible: bool,
155
  *     _reason: string,
155
  *     _reason: string,
156
  *     _suspendDetected: bool
156
  *     _suspendDetected: bool
157
  * }}
157
  * }}
194
         _haveToReload: stateFeaturesOverlay.haveToReload,
194
         _haveToReload: stateFeaturesOverlay.haveToReload,
195
 
195
 
196
         /**
196
         /**
197
-         * The indicator which determines whether the reload was caused by
198
-         * network failure.
197
+         * The indicator which determines whether the GUM permissions prompt is
198
+         * displayed or not.
199
          *
199
          *
200
-         * NOTE: Used by PageReloadOverlay only.
200
+         * NOTE: Used by UserMediaPermissionsOverlay only.
201
          *
201
          *
202
          * @private
202
          * @private
203
          * @type {boolean}
203
          * @type {boolean}
204
          */
204
          */
205
-        _isNetworkFailure: stateFeaturesOverlay.isNetworkFailure,
205
+        _isMediaPermissionPromptVisible:
206
+            stateFeaturesOverlay.isMediaPermissionPromptVisible,
206
 
207
 
207
         /**
208
         /**
208
-         * The indicator which determines whether the GUM permissions prompt is
209
-         * displayed or not.
209
+         * The indicator which determines whether the reload was caused by
210
+         * network failure.
210
          *
211
          *
211
-         * NOTE: Used by UserMediaPermissionsOverlay only.
212
+         * NOTE: Used by PageReloadOverlay only.
212
          *
213
          *
213
          * @private
214
          * @private
214
          * @type {boolean}
215
          * @type {boolean}
215
          */
216
          */
216
-        _mediaPermissionPromptVisible:
217
-            stateFeaturesOverlay.mediaPermissionPromptVisible,
217
+        _isNetworkFailure: stateFeaturesOverlay.isNetworkFailure,
218
 
218
 
219
         /**
219
         /**
220
          * The reason for the error that will cause the reload.
220
          * The reason for the error that will cause the reload.

+ 13
- 3
react/features/overlay/components/ReloadTimer.js View File

66
         super(props);
66
         super(props);
67
 
67
 
68
         this.state = {
68
         this.state = {
69
+            /**
70
+             * Current value(time) of the timer.
71
+             *
72
+             * @type {number}
73
+             */
69
             current: this.props.start,
74
             current: this.props.start,
75
+
76
+            /**
77
+             * The absolute value of the time from the start of the timer until
78
+             * the end of the timer.
79
+             *
80
+             * @type {number}
81
+             */
70
             time: Math.abs(this.props.end - this.props.start)
82
             time: Math.abs(this.props.end - this.props.start)
71
         };
83
         };
72
     }
84
     }
127
                     id = 'reloadProgressBar'>
139
                     id = 'reloadProgressBar'>
128
                     <span className = 'aui-progress-indicator-value' />
140
                     <span className = 'aui-progress-indicator-value' />
129
                 </div>
141
                 </div>
130
-                <span
131
-                    className = 'reload_overlay_text'
132
-                    id = 'reloadSeconds'>
142
+                <span className = 'reload_overlay_text'>
133
                     {
143
                     {
134
                         this.state.current
144
                         this.state.current
135
                     }
145
                     }

+ 0
- 1
react/features/overlay/components/SuspendedOverlay.js View File

29
                 <button
29
                 <button
30
                     className = { btnClass }
30
                     className = { btnClass }
31
                     data-i18n = 'suspendedoverlay.rejoinKeyTitle'
31
                     data-i18n = 'suspendedoverlay.rejoinKeyTitle'
32
-                    id = 'rejoin'
33
                     onClick = { this._reconnectNow } />
32
                     onClick = { this._reconnectNow } />
34
             </div>
33
             </div>
35
         );
34
         );

+ 1
- 1
react/features/overlay/reducer.js View File

127
 function _mediaPermissionPromptVisibilityChanged(state, action) {
127
 function _mediaPermissionPromptVisibilityChanged(state, action) {
128
     return setStateProperties(state, {
128
     return setStateProperties(state, {
129
         browser: action.browser,
129
         browser: action.browser,
130
-        mediaPermissionPromptVisible: action.isVisible
130
+        isMediaPermissionPromptVisible: action.isVisible
131
     });
131
     });
132
 }
132
 }
133
 
133
 

Loading…
Cancel
Save