/* global $, APP */ import Overlay from '../overlay/Overlay'; /** * An overlay dialog which is shown when a suspended event is detected. */ class SuspendedOverlayImpl extends Overlay{ /** * Creates new SuspendedOverlayImpl */ constructor() { super(); $(document).on('click', '#rejoin', () => { APP.ConferenceUrl.reload(); }); } /** * Constructs overlay body with the message and a button to rejoin. * @override */ _buildOverlayContent() { return ( `

`); } } /** * Holds the page suspended overlay instance. * * {@type SuspendedOverlayImpl} */ let overlay; export default { /** * Checks whether the page suspended overlay has been displayed. * @return {boolean} true if the page suspended overlay is * currently visible or false otherwise. */ isVisible() { return overlay && overlay.isVisible(); }, /** * Shows the page suspended overlay. */ show() { if (!overlay) { overlay = new SuspendedOverlayImpl(); } overlay.show(); } };