2018-04-17 20:18:02 +00:00
|
|
|
// @flow
|
|
|
|
|
2018-05-03 17:36:29 +00:00
|
|
|
// XXX Import the button directly in order to avoid bringing in other components
|
|
|
|
// that use lib-jitsi-meet, which always-on-top does not import.
|
2018-04-17 20:18:02 +00:00
|
|
|
import AbstractHangupButton
|
|
|
|
from '../toolbox/components/buttons/AbstractHangupButton';
|
|
|
|
import type { Props } from '../toolbox/components/buttons/AbstractButton';
|
|
|
|
|
|
|
|
const { api } = window.alwaysOnTop;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stateless hangup button for the Always-on-Top windows.
|
|
|
|
*/
|
|
|
|
export default class HangupButton extends AbstractHangupButton<Props, *> {
|
|
|
|
/**
|
|
|
|
* Helper function to perform the actual hangup action.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_doHangup() {
|
|
|
|
api.executeCommand('hangup');
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates whether this button is disabled or not.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
* @private
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
_isDisabled() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|