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

ConnectionStatusButton.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { openSheet } from '../../../base/dialog';
  2. import { translate } from '../../../base/i18n';
  3. import { IconInfoCircle } from '../../../base/icons';
  4. import { connect } from '../../../base/redux';
  5. import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
  6. import ConnectionStatusComponent from './ConnectionStatusComponent';
  7. export type Props = AbstractButtonProps & {
  8. /**
  9. * The redux {@code dispatch} function.
  10. */
  11. dispatch: Function,
  12. /**
  13. * The ID of the participant that this button is supposed to pin.
  14. */
  15. participantID: string,
  16. /**
  17. * The function to be used to translate i18n labels.
  18. */
  19. t: Function
  20. };
  21. /**
  22. * A remote video menu button which shows the connection statistics.
  23. */
  24. class ConnectionStatusButton extends AbstractButton<Props, *> {
  25. icon = IconInfoCircle;
  26. label = 'videothumbnail.connectionInfo';
  27. /**
  28. * Handles clicking / pressing the button, and kicks the participant.
  29. *
  30. * @private
  31. * @returns {void}
  32. */
  33. _handleClick() {
  34. const { dispatch, participantID } = this.props;
  35. dispatch(openSheet(ConnectionStatusComponent, {
  36. participantID
  37. }));
  38. }
  39. }
  40. export default translate(connect()(ConnectionStatusButton));