2017-01-31 20:58:48 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2017-03-01 02:55:12 +00:00
|
|
|
import { translate } from '../../base/i18n';
|
2017-01-31 20:58:48 +00:00
|
|
|
|
2017-03-01 02:55:12 +00:00
|
|
|
import AbstractOverlay from './AbstractOverlay';
|
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-02-23 16:56:25 +00:00
|
|
|
class SuspendedOverlay extends AbstractOverlay {
|
2017-01-31 20:58:48 +00:00
|
|
|
/**
|
|
|
|
* Constructs overlay body with the message and a button to rejoin.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement|null}
|
|
|
|
* @override
|
|
|
|
* @protected
|
|
|
|
*/
|
|
|
|
_renderOverlayContent() {
|
|
|
|
const btnClass = 'inlay__button button-control button-control_primary';
|
2017-02-23 16:56:25 +00:00
|
|
|
const { t } = this.props;
|
2017-01-31 20:58:48 +00:00
|
|
|
|
|
|
|
/* eslint-disable react/jsx-handler-names */
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className = 'inlay'>
|
|
|
|
<span className = 'inlay__icon icon-microphone' />
|
|
|
|
<span className = 'inlay__icon icon-camera' />
|
|
|
|
<h3
|
2017-02-23 16:56:25 +00:00
|
|
|
className = 'inlay__title'>
|
|
|
|
{ t('suspendedoverlay.title') }
|
|
|
|
</h3>
|
2017-01-31 20:58:48 +00:00
|
|
|
<button
|
|
|
|
className = { btnClass }
|
2017-02-23 16:56:25 +00:00
|
|
|
onClick = { this._reconnectNow }>
|
|
|
|
{ t('suspendedoverlay.rejoinKeyTitle') }
|
|
|
|
</button>
|
2017-01-31 20:58:48 +00:00
|
|
|
</div>
|
|
|
|
);
|
2017-02-19 00:42:11 +00:00
|
|
|
|
|
|
|
/* eslint-enable react/jsx-handler-names */
|
2017-01-31 20:58:48 +00:00
|
|
|
}
|
|
|
|
}
|
2017-02-23 16:56:25 +00:00
|
|
|
|
|
|
|
export default translate(SuspendedOverlay);
|