2017-03-09 00:16:53 +00:00
|
|
|
import React, { Component } from 'react';
|
2017-01-31 20:58:48 +00:00
|
|
|
|
2017-03-09 00:16:53 +00:00
|
|
|
import { translate, translateToHTML } from '../../base/i18n';
|
2017-01-31 20:58:48 +00:00
|
|
|
|
2017-03-09 00:16:53 +00:00
|
|
|
import OverlayFrame from './OverlayFrame';
|
|
|
|
import ReloadButton from './ReloadButton';
|
2017-02-23 16:56:25 +00:00
|
|
|
|
2017-01-31 20:58:48 +00:00
|
|
|
/**
|
2017-02-19 00:42:11 +00:00
|
|
|
* Implements a React Component for suspended overlay. Shown when a suspend is
|
|
|
|
* detected.
|
2017-01-31 20:58:48 +00:00
|
|
|
*/
|
2017-03-09 00:16:53 +00:00
|
|
|
class SuspendedOverlay extends Component {
|
2017-01-31 20:58:48 +00:00
|
|
|
/**
|
2017-03-09 00:16:53 +00:00
|
|
|
* SuspendedOverlay component's property types.
|
2017-01-31 20:58:48 +00:00
|
|
|
*
|
2017-03-09 00:16:53 +00:00
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
static propTypes = {
|
|
|
|
/**
|
|
|
|
* The function to translate human-readable text.
|
|
|
|
*
|
|
|
|
* @public
|
|
|
|
* @type {Function}
|
|
|
|
*/
|
|
|
|
t: React.PropTypes.func
|
2017-06-02 02:01:50 +00:00
|
|
|
};
|
2017-03-09 00:16:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
2017-01-31 20:58:48 +00:00
|
|
|
* @returns {ReactElement|null}
|
|
|
|
*/
|
2017-03-09 00:16:53 +00:00
|
|
|
render() {
|
2017-02-23 16:56:25 +00:00
|
|
|
const { t } = this.props;
|
2017-01-31 20:58:48 +00:00
|
|
|
|
|
|
|
return (
|
2017-03-09 00:16:53 +00:00
|
|
|
<OverlayFrame>
|
|
|
|
<div className = 'inlay'>
|
|
|
|
<span className = 'inlay__icon icon-microphone' />
|
|
|
|
<span className = 'inlay__icon icon-camera' />
|
|
|
|
<h3
|
|
|
|
className = 'inlay__title'>
|
|
|
|
{ t('suspendedoverlay.title') }
|
|
|
|
</h3>
|
|
|
|
<span className = 'inlay__text'>
|
|
|
|
{
|
|
|
|
translateToHTML(t, 'suspendedoverlay.title')
|
|
|
|
}
|
|
|
|
</span>
|
2017-05-31 05:24:34 +00:00
|
|
|
<ReloadButton textKey = 'suspendedoverlay.rejoinKeyTitle' />
|
2017-03-09 00:16:53 +00:00
|
|
|
</div>
|
|
|
|
</OverlayFrame>
|
2017-01-31 20:58:48 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-02-23 16:56:25 +00:00
|
|
|
|
|
|
|
export default translate(SuspendedOverlay);
|