2019-05-07 14:50:57 +00:00
|
|
|
// @flow
|
2018-10-30 05:02:23 +00:00
|
|
|
|
2018-02-13 19:46:47 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
2019-05-07 14:50:57 +00:00
|
|
|
import { translate } from '../../../../base/i18n';
|
2018-02-13 19:46:47 +00:00
|
|
|
|
2019-07-02 13:14:58 +00:00
|
|
|
import { _formatConferenceIDPin } from '../../../_utils';
|
|
|
|
|
2018-02-13 19:46:47 +00:00
|
|
|
/**
|
2018-10-30 05:02:23 +00:00
|
|
|
* The type of the React {@code Component} props of {@link ConferenceID}.
|
2018-02-13 19:46:47 +00:00
|
|
|
*/
|
2018-10-30 05:02:23 +00:00
|
|
|
type Props = {
|
|
|
|
|
2018-02-13 19:46:47 +00:00
|
|
|
/**
|
2018-10-30 05:02:23 +00:00
|
|
|
* The conference ID for dialing in.
|
|
|
|
*/
|
|
|
|
conferenceID: number,
|
|
|
|
|
2019-02-26 13:32:46 +00:00
|
|
|
/**
|
|
|
|
* The name of the conference.
|
|
|
|
*/
|
|
|
|
conferenceName: ?string,
|
|
|
|
|
2018-10-30 05:02:23 +00:00
|
|
|
/**
|
|
|
|
* Invoked to obtain translated strings.
|
2018-02-13 19:46:47 +00:00
|
|
|
*/
|
2018-10-30 05:02:23 +00:00
|
|
|
t: Function
|
|
|
|
};
|
2018-02-13 19:46:47 +00:00
|
|
|
|
2018-10-30 05:02:23 +00:00
|
|
|
/**
|
|
|
|
* Displays a conference ID used as a pin for dialing into a conference.
|
|
|
|
*
|
|
|
|
* @extends Component
|
|
|
|
*/
|
|
|
|
class ConferenceID extends Component<Props> {
|
2018-02-13 19:46:47 +00:00
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
2019-02-26 13:32:46 +00:00
|
|
|
const { conferenceID, conferenceName, t } = this.props;
|
2018-02-13 19:46:47 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className = 'dial-in-conference-id'>
|
2019-02-26 13:32:46 +00:00
|
|
|
<div className = 'dial-in-conference-name'>
|
|
|
|
{ conferenceName }
|
|
|
|
</div>
|
|
|
|
<div className = 'dial-in-conference-description'>
|
|
|
|
{ t('info.dialANumber') }
|
|
|
|
</div>
|
|
|
|
<div className = 'dial-in-conference-pin'>
|
2019-07-02 13:14:58 +00:00
|
|
|
{ `${t('info.dialInConferenceID')} ${_formatConferenceIDPin(conferenceID)}` }
|
2019-02-26 13:32:46 +00:00
|
|
|
</div>
|
2018-02-13 19:46:47 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(ConferenceID);
|