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

HangupButton.js 543B

1234567891011121314151617181920212223
  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. /**
  10. * Helper function to perform the actual hangup action.
  11. *
  12. * @override
  13. * @protected
  14. * @returns {void}
  15. */
  16. _doHangup() {
  17. api.executeCommand('hangup');
  18. window.close();
  19. }
  20. }