You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HangupButton.js 933B

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