2018-04-17 20:18:02 +00:00
|
|
|
// @flow
|
|
|
|
|
2018-05-10 23:01:55 +00:00
|
|
|
import { AbstractHangupButton } from '../base/toolbox';
|
|
|
|
import type { AbstractButtonProps as Props } from '../base/toolbox';
|
2018-04-17 20:18:02 +00:00
|
|
|
|
|
|
|
const { api } = window.alwaysOnTop;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stateless hangup button for the Always-on-Top windows.
|
|
|
|
*/
|
|
|
|
export default class HangupButton extends AbstractHangupButton<Props, *> {
|
2018-06-07 20:32:18 +00:00
|
|
|
|
|
|
|
accessibilityLabel = 'Hangup';
|
|
|
|
|
2018-04-17 20:18:02 +00:00
|
|
|
/**
|
|
|
|
* Helper function to perform the actual hangup action.
|
|
|
|
*
|
|
|
|
* @override
|
2018-05-11 02:10:26 +00:00
|
|
|
* @protected
|
2018-04-17 20:18:02 +00:00
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_doHangup() {
|
|
|
|
api.executeCommand('hangup');
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
}
|