bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-dial/component.jsx

62 lines
1.7 KiB
React
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages, intlShape } from 'react-intl';
import { styles } from './styles';
const intlMessages = defineMessages({
audioDialDescription: {
id: 'app.audioDial.audioDialDescription',
2019-04-17 01:04:23 +08:00
description: 'Text description for the audio help',
},
audioDialConfrenceText: {
id: 'app.audioDial.audioDialConfrenceText',
description: 'audio settings back button label',
},
tipIndicator: {
id: 'app.audioDial.tipIndicator',
description: 'Indicator for the tip message',
},
tipMessage: {
id: 'app.audioDial.tipMessage',
description: 'Tip message explaining how to mute/unmute yourself',
},
});
const propTypes = {
intl: intlShape.isRequired,
2019-04-16 00:39:36 +08:00
formattedDialNum: PropTypes.string.isRequired,
telVoice: PropTypes.string.isRequired,
};
class AudioDial extends React.PureComponent {
render() {
const {
intl,
2019-04-16 00:39:36 +08:00
formattedDialNum,
telVoice,
} = this.props;
return (
<span className={styles.help}>
<div className={styles.text}>
{intl.formatMessage(intlMessages.audioDialDescription)}
</div>
2019-04-16 00:39:36 +08:00
<div className={styles.dialText}>{formattedDialNum}</div>
<div className={styles.conferenceText}>
{intl.formatMessage(intlMessages.audioDialConfrenceText)}
</div>
<div className={styles.telvoice}>{telVoice}</div>
<div className={styles.tipBox}>
<span className={styles.tipIndicator}>
2019-07-12 03:36:30 +08:00
{`${intl.formatMessage(intlMessages.tipIndicator)}: `}
</span>
{intl.formatMessage(intlMessages.tipMessage)}
</div>
</span>
);
}
}
AudioDial.propTypes = propTypes;
export default injectIntl(AudioDial);