fix(overlay): comments after review

This commit is contained in:
hristoterezov 2017-02-22 12:57:07 -06:00 committed by Lyubo Marinov
parent e89c2b242d
commit 436bc87a86
4 changed files with 40 additions and 31 deletions

View File

@ -50,6 +50,17 @@ class OverlayContainer extends Component {
*/
_haveToReload: React.PropTypes.bool,
/**
* The indicator which determines whether the GUM permissions prompt is
* displayed or not.
*
* NOTE: Used by UserMediaPermissionsOverlay only.
*
* @private
* @type {boolean}
*/
_isMediaPermissionPromptVisible: React.PropTypes.bool,
/**
* The indicator which determines whether the reload was caused by
* network failure.
@ -61,17 +72,6 @@ class OverlayContainer extends Component {
*/
_isNetworkFailure: React.PropTypes.bool,
/**
* The indicator which determines whether the GUM permissions prompt is
* displayed or not.
*
* NOTE: Used by UserMediaPermissionsOverlay only.
*
* @private
* @type {boolean}
*/
_mediaPermissionPromptVisible: React.PropTypes.bool,
/**
* The reason for the error that will cause the reload.
*
@ -106,7 +106,7 @@ class OverlayContainer extends Component {
APP.UI.overlayVisible
= (this.props._connectionEstablished && this.props._haveToReload)
|| this.props._suspendDetected
|| this.props._mediaPermissionPromptVisible;
|| this.props._isMediaPermissionPromptVisible;
}
/**
@ -131,7 +131,7 @@ class OverlayContainer extends Component {
);
}
if (this.props._mediaPermissionPromptVisible) {
if (this.props._isMediaPermissionPromptVisible) {
return (
<UserMediaPermissionsOverlay
browser = { this.props._browser } />
@ -151,7 +151,7 @@ class OverlayContainer extends Component {
* _connectionEstablished: bool,
* _haveToReload: bool,
* _isNetworkFailure: bool,
* _mediaPermissionPromptVisible: bool,
* _isMediaPermissionPromptVisible: bool,
* _reason: string,
* _suspendDetected: bool
* }}
@ -193,6 +193,18 @@ function _mapStateToProps(state) {
*/
_haveToReload: stateFeaturesOverlay.haveToReload,
/**
* The indicator which determines whether the GUM permissions prompt is
* displayed or not.
*
* NOTE: Used by UserMediaPermissionsOverlay only.
*
* @private
* @type {boolean}
*/
_isMediaPermissionPromptVisible:
stateFeaturesOverlay.isMediaPermissionPromptVisible,
/**
* The indicator which determines whether the reload was caused by
* network failure.
@ -204,18 +216,6 @@ function _mapStateToProps(state) {
*/
_isNetworkFailure: stateFeaturesOverlay.isNetworkFailure,
/**
* The indicator which determines whether the GUM permissions prompt is
* displayed or not.
*
* NOTE: Used by UserMediaPermissionsOverlay only.
*
* @private
* @type {boolean}
*/
_mediaPermissionPromptVisible:
stateFeaturesOverlay.mediaPermissionPromptVisible,
/**
* The reason for the error that will cause the reload.
*

View File

@ -66,7 +66,19 @@ export default class ReloadTimer extends Component {
super(props);
this.state = {
/**
* Current value(time) of the timer.
*
* @type {number}
*/
current: this.props.start,
/**
* The absolute value of the time from the start of the timer until
* the end of the timer.
*
* @type {number}
*/
time: Math.abs(this.props.end - this.props.start)
};
}
@ -127,9 +139,7 @@ export default class ReloadTimer extends Component {
id = 'reloadProgressBar'>
<span className = 'aui-progress-indicator-value' />
</div>
<span
className = 'reload_overlay_text'
id = 'reloadSeconds'>
<span className = 'reload_overlay_text'>
{
this.state.current
}

View File

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

View File

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