feat(invite): include dial-in numbers in the invite modal

Create a new React Component for displaying a list of dial-in
numbers. The Component will fetch the numbers from a new
numberRetreviewUrl key/value set in config. If not present in
config, the Component will not be displayed.
This commit is contained in:
Leonard Kim
2017-04-20 16:28:03 -07:00
parent 6c676f8d5f
commit d7cccacc12
8 changed files with 579 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import {
import PasswordContainer from './PasswordContainer';
import ShareLinkForm from './ShareLinkForm';
import DialInNumbersForm from './DialInNumbersForm';
/**
* A React {@code Component} for displaying other components responsible for
@@ -40,6 +41,11 @@ class InviteDialog extends Component {
*/
conferenceUrl: React.PropTypes.string,
/**
* The url for retrieving dial-in numbers.
*/
dialInNumbersUrl: React.PropTypes.string,
/**
* Invoked to obtain translated strings.
*/
@@ -75,6 +81,7 @@ class InviteDialog extends Component {
titleString = { titleString }>
<div className = 'invite-dialog'>
<ShareLinkForm toCopy = { this.props.conferenceUrl } />
{ this._renderDialInNumbersForm() }
<PasswordContainer
conference = { _conference.conference }
locked = { _conference.locked }
@@ -84,6 +91,22 @@ class InviteDialog extends Component {
</Dialog>
);
}
/**
* Creates a React {@code Component} for displaying and copying to clipboard
* telephone numbers for dialing in to the conference.
*
* @private
* @returns {ReactElement|null}
*/
_renderDialInNumbersForm() {
return (
this.props.dialInNumbersUrl
? <DialInNumbersForm
dialInNumbersUrl = { this.props.dialInNumbersUrl } />
: null
);
}
}
/**