2019-04-09 11:05:20 +00:00
|
|
|
// @flow
|
|
|
|
|
2017-03-09 00:16:53 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2019-04-09 11:05:20 +00:00
|
|
|
import { translate } from '../../../base/i18n';
|
|
|
|
import { connect } from '../../../base/redux';
|
|
|
|
|
|
|
|
import AbstractPageReloadOverlay, { type Props, abstractMapStateToProps }
|
|
|
|
from '../AbstractPageReloadOverlay';
|
2017-03-09 00:16:53 +00:00
|
|
|
|
2017-04-10 17:59:44 +00:00
|
|
|
import FilmstripOnlyOverlayFrame from './FilmstripOnlyOverlayFrame';
|
2017-03-09 00:16:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a React Component for page reload overlay for filmstrip only
|
|
|
|
* mode. Shown before the conference is reloaded. Shows a warning message and
|
|
|
|
* counts down towards the reload.
|
|
|
|
*/
|
2019-04-09 11:05:20 +00:00
|
|
|
class PageReloadFilmstripOnlyOverlay extends AbstractPageReloadOverlay<Props> {
|
2017-03-09 00:16:53 +00:00
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
2017-09-22 20:01:51 +00:00
|
|
|
* @returns {ReactElement}
|
2017-03-09 00:16:53 +00:00
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
const { t } = this.props;
|
|
|
|
const { message, timeLeft, title } = this.state;
|
|
|
|
|
|
|
|
return (
|
2017-04-10 17:59:44 +00:00
|
|
|
<FilmstripOnlyOverlayFrame>
|
2017-03-09 00:16:53 +00:00
|
|
|
<div className = 'inlay-filmstrip-only__container'>
|
|
|
|
<div className = 'inlay-filmstrip-only__title'>
|
|
|
|
{ t(title) }
|
|
|
|
</div>
|
|
|
|
<div className = 'inlay-filmstrip-only__text'>
|
|
|
|
{ t(message, { seconds: timeLeft }) }
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-31 05:24:34 +00:00
|
|
|
{ this._renderButton() }
|
|
|
|
{ this._renderProgressBar() }
|
2017-04-10 17:59:44 +00:00
|
|
|
</FilmstripOnlyOverlayFrame>
|
2017-03-09 00:16:53 +00:00
|
|
|
);
|
|
|
|
}
|
2019-04-09 11:05:20 +00:00
|
|
|
|
|
|
|
_renderButton: () => React$Element<*> | null
|
|
|
|
|
|
|
|
_renderProgressBar: () => React$Element<*> | null
|
2017-03-09 00:16:53 +00:00
|
|
|
}
|
|
|
|
|
2017-11-09 13:34:42 +00:00
|
|
|
export default translate(
|
|
|
|
connect(abstractMapStateToProps)(PageReloadFilmstripOnlyOverlay));
|