You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ConnectionStatusButton.js 1.3KB

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