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

CopyMeetingUrl.js 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // @flow
  2. import React, { Component } from 'react';
  3. import CopyMeetingLinkSection
  4. from '../../../../invite/components/add-people-dialog/web/CopyMeetingLinkSection';
  5. import { getCurrentConferenceUrl } from '../../../connection';
  6. import { translate } from '../../../i18n';
  7. import { connect } from '../../../redux';
  8. type Props = {
  9. /**
  10. * The meeting url.
  11. */
  12. url: string,
  13. /**
  14. * Used for translation.
  15. */
  16. t: Function,
  17. /**
  18. * Used to determine if invitation link should be automatically copied
  19. * after creating a meeting.
  20. */
  21. _enableAutomaticUrlCopy: boolean,
  22. };
  23. /**
  24. * Component used to copy meeting url on prejoin page.
  25. */
  26. class CopyMeetingUrl extends Component<Props> {
  27. /**
  28. * Implements React's {@link Component#render()}.
  29. *
  30. * @inheritdoc
  31. * @returns {ReactElement}
  32. */
  33. render() {
  34. return (
  35. <div className = 'copy-meeting'>
  36. <CopyMeetingLinkSection url = { this.props.url } />
  37. </div>
  38. );
  39. }
  40. }
  41. /**
  42. * Maps (parts of) the redux state to the React {@code Component} props.
  43. *
  44. * @param {Object} state - The redux state.
  45. * @returns {Object}
  46. */
  47. function mapStateToProps(state) {
  48. const { enableAutomaticUrlCopy } = state['features/base/config'];
  49. const { customizationReady } = state['features/dynamic-branding'];
  50. return {
  51. url: customizationReady ? getCurrentConferenceUrl(state) : '',
  52. _enableAutomaticUrlCopy: enableAutomaticUrlCopy || false
  53. };
  54. }
  55. export default connect(mapStateToProps)(translate(CopyMeetingUrl));