Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ConnectionStatusButton.ts 1.1KB

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