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

ParticipantsPaneButton.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { openDialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { IconParticipants } from '../../../base/icons';
  6. import { setActiveModalId } from '../../../base/modal';
  7. import { connect } from '../../../base/redux';
  8. import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
  9. import {
  10. PARTICIPANTS_PANE_ID
  11. } from '../../../invite/constants';
  12. import { ParticipantsPane } from './';
  13. type Props = AbstractButtonProps & {
  14. /**
  15. * The redux {@code dispatch} function.
  16. */
  17. dispatch: Dispatch<any>
  18. };
  19. /**
  20. * Implements an {@link AbstractButton} to open the participants panel.
  21. */
  22. class ParticipantsPaneButton extends AbstractButton<Props, *> {
  23. accessibilityLabel = 'toolbar.accessibilityLabel.participants';
  24. icon = IconParticipants;
  25. label = 'toolbar.participants';
  26. /**
  27. * Handles clicking / pressing the button, and opens the participants panel.
  28. *
  29. * @private
  30. * @returns {void}
  31. */
  32. _handleClick() {
  33. this.props.dispatch(openDialog(ParticipantsPane));
  34. this.props.dispatch(setActiveModalId(PARTICIPANTS_PANE_ID));
  35. }
  36. }
  37. export default translate(connect()(ParticipantsPaneButton));