Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

HangupButton.js 916B

12345678910111213141516171819202122232425262728293031323334353637
  1. // @flow
  2. // XXX Import the button directly in order to avoid bringing in other components
  3. // that use lib-jitsi-meet, which always-on-top does not import.
  4. import AbstractHangupButton
  5. from '../toolbox/components/buttons/AbstractHangupButton';
  6. import type { Props } from '../toolbox/components/buttons/AbstractButton';
  7. const { api } = window.alwaysOnTop;
  8. /**
  9. * Stateless hangup button for the Always-on-Top windows.
  10. */
  11. export default class HangupButton extends AbstractHangupButton<Props, *> {
  12. /**
  13. * Helper function to perform the actual hangup action.
  14. *
  15. * @override
  16. * @private
  17. * @returns {void}
  18. */
  19. _doHangup() {
  20. api.executeCommand('hangup');
  21. window.close();
  22. }
  23. /**
  24. * Indicates whether this button is disabled or not.
  25. *
  26. * @override
  27. * @private
  28. * @returns {boolean}
  29. */
  30. _isDisabled() {
  31. return false;
  32. }
  33. }