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 580B

1234567891011121314151617181920212223242526
  1. // @flow
  2. import { AbstractHangupButton } from '../base/toolbox';
  3. import type { AbstractButtonProps as Props } from '../base/toolbox';
  4. const { api } = window.alwaysOnTop;
  5. /**
  6. * Stateless hangup button for the Always-on-Top windows.
  7. */
  8. export default class HangupButton extends AbstractHangupButton<Props, *> {
  9. accessibilityLabel = 'Hangup';
  10. /**
  11. * Helper function to perform the actual hangup action.
  12. *
  13. * @override
  14. * @protected
  15. * @returns {void}
  16. */
  17. _doHangup() {
  18. api.executeCommand('hangup');
  19. window.close();
  20. }
  21. }