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

KickButton.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import { connect } from 'react-redux';
  3. import { openDialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { AbstractButton } from '../../../base/toolbox';
  6. import type { AbstractButtonProps } from '../../../base/toolbox';
  7. import KickRemoteParticipantDialog from './KickRemoteParticipantDialog';
  8. type Props = AbstractButtonProps & {
  9. /**
  10. * The redux {@code dispatch} function.
  11. */
  12. dispatch: Function,
  13. /**
  14. * The participant object that this button is supposed to kick.
  15. */
  16. participant: Object
  17. };
  18. /**
  19. * A remote video menu button which kicks the remote participant.
  20. */
  21. class KickButton extends AbstractButton<Props, *> {
  22. accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
  23. iconName = 'icon-kick';
  24. label = 'videothumbnail.kick';
  25. /**
  26. * Handles clicking / pressing the button, and kicks the participant.
  27. *
  28. * @private
  29. * @returns {void}
  30. */
  31. _handleClick() {
  32. const { dispatch, participant } = this.props;
  33. dispatch(openDialog(KickRemoteParticipantDialog, { participant }));
  34. }
  35. }
  36. export default translate(connect()(KickButton));