2022-06-20 14:53:19 +00:00
|
|
|
import { openSheet } from '../../../base/dialog';
|
2020-12-22 09:12:52 +00:00
|
|
|
import { translate } from '../../../base/i18n';
|
2022-11-08 10:24:32 +00:00
|
|
|
import { IconInfoCircle } from '../../../base/icons';
|
2020-12-22 09:12:52 +00:00
|
|
|
import { connect } from '../../../base/redux';
|
|
|
|
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
|
|
|
|
|
|
|
import ConnectionStatusComponent from './ConnectionStatusComponent';
|
|
|
|
|
|
|
|
export type Props = AbstractButtonProps & {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The redux {@code dispatch} function.
|
|
|
|
*/
|
|
|
|
dispatch: Function,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The ID of the participant that this button is supposed to pin.
|
|
|
|
*/
|
|
|
|
participantID: string,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The function to be used to translate i18n labels.
|
|
|
|
*/
|
|
|
|
t: Function
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A remote video menu button which shows the connection statistics.
|
|
|
|
*/
|
|
|
|
class ConnectionStatusButton extends AbstractButton<Props, *> {
|
2022-11-08 10:24:32 +00:00
|
|
|
icon = IconInfoCircle;
|
2020-12-22 09:12:52 +00:00
|
|
|
label = 'videothumbnail.connectionInfo';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles clicking / pressing the button, and kicks the participant.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_handleClick() {
|
|
|
|
const { dispatch, participantID } = this.props;
|
|
|
|
|
2022-06-20 14:53:19 +00:00
|
|
|
dispatch(openSheet(ConnectionStatusComponent, {
|
2020-12-22 09:12:52 +00:00
|
|
|
participantID
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect()(ConnectionStatusButton));
|