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

ShowDialInInfoButton.native.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // @flow
  2. import { translate } from '../../base/i18n';
  3. import { IconInfo } from '../../base/icons';
  4. import { setActiveModalId } from '../../base/modal';
  5. import { connect } from '../../base/redux';
  6. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  7. import { DIAL_IN_SUMMARY_VIEW_ID } from '../../invite/constants';
  8. export type Props = AbstractButtonProps & {
  9. /**
  10. * The redux {@code dispatch} function.
  11. */
  12. dispatch: Function,
  13. /**
  14. * The ID of the entry to be deleted.
  15. */
  16. itemId: Object,
  17. /**
  18. * The function to be used to translate i18n labels.
  19. */
  20. t: Function
  21. };
  22. /**
  23. * A recent list menu button which opens the dial-in info dialog.
  24. */
  25. class ShowDialInInfoButton extends AbstractButton<Props, *> {
  26. accessibilityLabel = 'welcomepage.info';
  27. icon = IconInfo;
  28. label = 'welcomepage.info';
  29. /**
  30. * Handles clicking / pressing the button.
  31. *
  32. * @private
  33. * @returns {void}
  34. */
  35. _handleClick() {
  36. const { dispatch, itemId } = this.props;
  37. dispatch(setActiveModalId(DIAL_IN_SUMMARY_VIEW_ID, { summaryUrl: itemId.url }));
  38. }
  39. }
  40. export default translate(connect()(ShowDialInInfoButton));