jiti-meet/react/features/video-menu/components/native/ConnectionStatusButton.js

50 lines
1.3 KiB
JavaScript
Raw Normal View History

import { openSheet } from '../../../base/dialog';
2020-12-22 09:12:52 +00:00
import { translate } from '../../../base/i18n';
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, *> {
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;
dispatch(openSheet(ConnectionStatusComponent, {
2020-12-22 09:12:52 +00:00
participantID
}));
}
}
export default translate(connect()(ConnectionStatusButton));