Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

SuspendedOverlay.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* global $, APP */
  2. import Overlay from '../overlay/Overlay';
  3. /**
  4. * An overlay dialog which is shown when a suspended event is detected.
  5. */
  6. class SuspendedOverlayImpl extends Overlay{
  7. /**
  8. * Creates new <tt>SuspendedOverlayImpl</tt>
  9. */
  10. constructor() {
  11. super();
  12. $(document).on('click', '#rejoin', () => {
  13. APP.ConferenceUrl.reload();
  14. });
  15. }
  16. /**
  17. * Constructs overlay body with the message and a button to rejoin.
  18. * @override
  19. */
  20. _buildOverlayContent() {
  21. return (
  22. `<div class="inlay">
  23. <span class="inlay__icon icon-microphone"></span>
  24. <span class="inlay__icon icon-camera"></span>
  25. <h3 class="inlay__title" data-i18n="suspendedoverlay.title"></h3>
  26. <button id="rejoin"
  27. data-i18n="suspendedoverlay.rejoinKeyTitle"
  28. class="inlay__button button-control button-control_primary">
  29. </button>
  30. </div>`);
  31. }
  32. }
  33. /**
  34. * Holds the page suspended overlay instance.
  35. *
  36. * {@type SuspendedOverlayImpl}
  37. */
  38. let overlay;
  39. export default {
  40. /**
  41. * Checks whether the page suspended overlay has been displayed.
  42. * @return {boolean} <tt>true</tt> if the page suspended overlay is
  43. * currently visible or <tt>false</tt> otherwise.
  44. */
  45. isVisible() {
  46. return overlay && overlay.isVisible();
  47. },
  48. /**
  49. * Shows the page suspended overlay.
  50. */
  51. show() {
  52. if (!overlay) {
  53. overlay = new SuspendedOverlayImpl();
  54. }
  55. overlay.show();
  56. }
  57. };