您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ConnectionStatusButton.ts 1.0KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { connect } from 'react-redux';
  2. import { translate } from '../../../base/i18n/functions';
  3. import { IconInfoCircle } from '../../../base/icons/svg';
  4. import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
  5. import { showConnectionStatus } from '../../../participants-pane/actions.native';
  6. export interface IProps extends AbstractButtonProps {
  7. /**
  8. * The ID of the participant that this button is supposed to pin.
  9. */
  10. participantID: string;
  11. }
  12. /**
  13. * A remote video menu button which shows the connection statistics.
  14. */
  15. class ConnectionStatusButton extends AbstractButton<IProps> {
  16. icon = IconInfoCircle;
  17. label = 'videothumbnail.connectionInfo';
  18. /**
  19. * Handles clicking / pressing the button, and kicks the participant.
  20. *
  21. * @private
  22. * @returns {void}
  23. */
  24. _handleClick() {
  25. const { dispatch, participantID } = this.props;
  26. dispatch(showConnectionStatus(participantID));
  27. }
  28. }
  29. export default translate(connect()(ConnectionStatusButton));