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.

AbstractKickButton.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // @flow
  2. import { openDialog } from '../../base/dialog';
  3. import { IconKick } from '../../base/icons';
  4. import { AbstractButton } from '../../base/toolbox';
  5. import type { AbstractButtonProps } from '../../base/toolbox';
  6. import { KickRemoteParticipantDialog } from '.';
  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 kick.
  14. */
  15. participantID: string,
  16. /**
  17. * The function to be used to translate i18n labels.
  18. */
  19. t: Function
  20. };
  21. /**
  22. * An abstract remote video menu button which kicks the remote participant.
  23. */
  24. export default class AbstractKickButton extends AbstractButton<Props, *> {
  25. accessibilityLabel = 'toolbar.accessibilityLabel.kick';
  26. icon = IconKick;
  27. label = 'videothumbnail.kick';
  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(KickRemoteParticipantDialog, { participantID }));
  37. }
  38. }