Files
jitsi-meet/react/features/video-menu/components/native/ConnectionStatusButton.ts

41 lines
1.1 KiB
TypeScript
Raw Normal View History

import { connect } from 'react-redux';
2023-03-31 14:04:33 +03:00
import { openSheet } from '../../../base/dialog/actions';
import { translate } from '../../../base/i18n/functions';
import { IconInfoCircle } from '../../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
2020-12-22 11:12:52 +02:00
import ConnectionStatusComponent from './ConnectionStatusComponent';
export interface IProps extends AbstractButtonProps {
2020-12-22 11:12:52 +02:00
/**
* The ID of the participant that this button is supposed to pin.
*/
participantID: string;
}
2020-12-22 11:12:52 +02:00
/**
* A remote video menu button which shows the connection statistics.
*/
class ConnectionStatusButton extends AbstractButton<IProps> {
icon = IconInfoCircle;
2020-12-22 11:12:52 +02: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 11:12:52 +02:00
participantID
}));
}
}
export default translate(connect()(ConnectionStatusButton));