Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

AbstractKickRemoteParticipantDialog.ts 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { Component } from 'react';
  2. import { WithTranslation } from 'react-i18next';
  3. import { createRemoteVideoMenuButtonEvent } from '../../analytics/AnalyticsEvents';
  4. import { sendAnalytics } from '../../analytics/functions';
  5. import { IStore } from '../../app/types';
  6. import { kickParticipant } from '../../base/participants/actions';
  7. interface IProps extends WithTranslation {
  8. /**
  9. * The Redux dispatch function.
  10. */
  11. dispatch: IStore['dispatch'];
  12. /**
  13. * The ID of the remote participant to be kicked.
  14. */
  15. participantID: string;
  16. }
  17. /**
  18. * Abstract dialog to confirm a remote participant kick action.
  19. */
  20. export default class AbstractKickRemoteParticipantDialog
  21. extends Component<IProps> {
  22. /**
  23. * Initializes a new {@code AbstractKickRemoteParticipantDialog} instance.
  24. *
  25. * @inheritdoc
  26. */
  27. constructor(props: IProps) {
  28. super(props);
  29. this._onSubmit = this._onSubmit.bind(this);
  30. }
  31. /**
  32. * Callback for the confirm button.
  33. *
  34. * @private
  35. * @returns {boolean} - True (to note that the modal should be closed).
  36. */
  37. _onSubmit() {
  38. const { dispatch, participantID } = this.props;
  39. sendAnalytics(createRemoteVideoMenuButtonEvent(
  40. 'kick.button',
  41. {
  42. 'participant_id': participantID
  43. }));
  44. dispatch(kickParticipant(participantID));
  45. return true;
  46. }
  47. }