瀏覽代碼

fix(overlay): comments after review

j8
hristoterezov 8 年之前
父節點
當前提交
436bc87a86

+ 20
- 20
react/features/overlay/components/OverlayContainer.js 查看文件

@@ -51,26 +51,26 @@ class OverlayContainer extends Component {
51 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 59
          * @private
60 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 70
          * @private
71 71
          * @type {boolean}
72 72
          */
73
-        _mediaPermissionPromptVisible: React.PropTypes.bool,
73
+        _isNetworkFailure: React.PropTypes.bool,
74 74
 
75 75
         /**
76 76
          * The reason for the error that will cause the reload.
@@ -106,7 +106,7 @@ class OverlayContainer extends Component {
106 106
         APP.UI.overlayVisible
107 107
             = (this.props._connectionEstablished && this.props._haveToReload)
108 108
                 || this.props._suspendDetected
109
-                || this.props._mediaPermissionPromptVisible;
109
+                || this.props._isMediaPermissionPromptVisible;
110 110
     }
111 111
 
112 112
     /**
@@ -131,7 +131,7 @@ class OverlayContainer extends Component {
131 131
             );
132 132
         }
133 133
 
134
-        if (this.props._mediaPermissionPromptVisible) {
134
+        if (this.props._isMediaPermissionPromptVisible) {
135 135
             return (
136 136
                 <UserMediaPermissionsOverlay
137 137
                     browser = { this.props._browser } />
@@ -151,7 +151,7 @@ class OverlayContainer extends Component {
151 151
  *     _connectionEstablished: bool,
152 152
  *     _haveToReload: bool,
153 153
  *     _isNetworkFailure: bool,
154
- *     _mediaPermissionPromptVisible: bool,
154
+ *     _isMediaPermissionPromptVisible: bool,
155 155
  *     _reason: string,
156 156
  *     _suspendDetected: bool
157 157
  * }}
@@ -194,27 +194,27 @@ function _mapStateToProps(state) {
194 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 202
          * @private
203 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 214
          * @private
214 215
          * @type {boolean}
215 216
          */
216
-        _mediaPermissionPromptVisible:
217
-            stateFeaturesOverlay.mediaPermissionPromptVisible,
217
+        _isNetworkFailure: stateFeaturesOverlay.isNetworkFailure,
218 218
 
219 219
         /**
220 220
          * The reason for the error that will cause the reload.

+ 13
- 3
react/features/overlay/components/ReloadTimer.js 查看文件

@@ -66,7 +66,19 @@ export default class ReloadTimer extends Component {
66 66
         super(props);
67 67
 
68 68
         this.state = {
69
+            /**
70
+             * Current value(time) of the timer.
71
+             *
72
+             * @type {number}
73
+             */
69 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 82
             time: Math.abs(this.props.end - this.props.start)
71 83
         };
72 84
     }
@@ -127,9 +139,7 @@ export default class ReloadTimer extends Component {
127 139
                     id = 'reloadProgressBar'>
128 140
                     <span className = 'aui-progress-indicator-value' />
129 141
                 </div>
130
-                <span
131
-                    className = 'reload_overlay_text'
132
-                    id = 'reloadSeconds'>
142
+                <span className = 'reload_overlay_text'>
133 143
                     {
134 144
                         this.state.current
135 145
                     }

+ 0
- 1
react/features/overlay/components/SuspendedOverlay.js 查看文件

@@ -29,7 +29,6 @@ export default class SuspendedOverlay extends AbstractOverlay {
29 29
                 <button
30 30
                     className = { btnClass }
31 31
                     data-i18n = 'suspendedoverlay.rejoinKeyTitle'
32
-                    id = 'rejoin'
33 32
                     onClick = { this._reconnectNow } />
34 33
             </div>
35 34
         );

+ 1
- 1
react/features/overlay/reducer.js 查看文件

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

Loading…
取消
儲存