feat(invite): Add conference id to dial-in numbers display

DialInNumbersForm has been modified to display a conference id to be used for
dialing into the conference. The changes include:
- Requesting the conference id and adding the conference id to the redux store
- Displaying the conference id in DialInNumbersForm
- Modifying the copy behavior to support copying the new message to clipboard
- DialInNumbersForm does not display until all ajax requests have completed
  successfully. This eliminates the need for the REQUESTING state.
This commit is contained in:
Leonard Kim
2017-05-16 12:19:30 -07:00
parent 896dcde2b2
commit 47c07c2e76
7 changed files with 137 additions and 148 deletions

View File

@@ -41,11 +41,6 @@ class InviteDialog extends Component {
*/
conferenceUrl: React.PropTypes.string,
/**
* The url for retrieving dial-in numbers.
*/
dialInNumbersUrl: React.PropTypes.string,
/**
* Invoked to obtain translated strings.
*/
@@ -68,7 +63,7 @@ class InviteDialog extends Component {
* @returns {ReactElement}
*/
render() {
const { _conference } = this.props;
const { _conference, conferenceUrl } = this.props;
const titleString
= this.props.t(
'invite.inviteTo',
@@ -80,8 +75,8 @@ class InviteDialog extends Component {
okTitleKey = 'dialog.done'
titleString = { titleString }>
<div className = 'invite-dialog'>
<ShareLinkForm toCopy = { this.props.conferenceUrl } />
{ this._renderDialInNumbersForm() }
<ShareLinkForm toCopy = { conferenceUrl } />
<DialInNumbersForm conferenceUrl = { conferenceUrl } />
<PasswordContainer
conference = { _conference.conference }
locked = { _conference.locked }
@@ -91,22 +86,6 @@ 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
);
}
}
/**