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

DialInSection.js 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../../../base/i18n';
  4. import { connect } from '../../../../base/redux';
  5. import { getDialInfoPageURL } from '../../../functions';
  6. import DialInNumber from './DialInNumber';
  7. type Props = {
  8. /**
  9. * The object representing the dialIn feature.
  10. */
  11. _dialIn: Object,
  12. /**
  13. * The url of the page containing the dial-in numbers list.
  14. */
  15. _dialInfoPageUrl: string,
  16. /**
  17. * The phone number to dial to begin the process of dialing into a
  18. * conference.
  19. */
  20. phoneNumber: string,
  21. /**
  22. * Invoked to obtain translated strings.
  23. */
  24. t: Function
  25. };
  26. /**
  27. * Returns a ReactElement for showing how to dial into the conference, if
  28. * dialing in is available.
  29. *
  30. * @private
  31. * @returns {null|ReactElement}
  32. */
  33. function DialInSection({
  34. _dialIn,
  35. _dialInfoPageUrl,
  36. phoneNumber,
  37. t
  38. }: Props) {
  39. return (
  40. <div className = 'invite-more-dialog dial-in-display'>
  41. <DialInNumber
  42. conferenceID = { _dialIn.conferenceID }
  43. phoneNumber = { phoneNumber } />
  44. {_dialIn.numbers && _dialIn.numbers.length > 1 ? <a
  45. className = 'more-numbers'
  46. href = { _dialInfoPageUrl }
  47. rel = 'noopener noreferrer'
  48. target = '_blank'>
  49. { t('info.moreNumbers') }
  50. </a> : null}
  51. </div>
  52. );
  53. }
  54. /**
  55. * Maps (parts of) the Redux state to the associated props for the
  56. * {@code DialInLink} component.
  57. *
  58. * @param {Object} state - The Redux state.
  59. * @private
  60. * @returns {Props}
  61. */
  62. function _mapStateToProps(state) {
  63. return {
  64. _dialIn: state['features/invite'],
  65. _dialInfoPageUrl: getDialInfoPageURL(state)
  66. };
  67. }
  68. export default translate(connect(_mapStateToProps)(DialInSection));