您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }