2018-07-26 16:33:40 +00:00
|
|
|
// @flow
|
|
|
|
|
2018-08-16 19:34:26 +00:00
|
|
|
import Tooltip from '@atlaskit/tooltip';
|
2018-07-26 16:33:40 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
2018-08-16 19:34:26 +00:00
|
|
|
import { translate } from '../../base/i18n';
|
|
|
|
import { CircularLabel } from '../../base/label';
|
2019-03-21 16:38:29 +00:00
|
|
|
import { connect } from '../../base/redux';
|
2018-07-26 16:33:40 +00:00
|
|
|
|
2018-09-12 15:10:12 +00:00
|
|
|
import { _mapStateToProps, type Props } from './AbstractTranscribingLabel';
|
2018-07-26 16:33:40 +00:00
|
|
|
|
|
|
|
/**
|
2018-08-16 19:34:26 +00:00
|
|
|
* React {@code Component} for displaying a label when a transcriber is in the
|
2018-07-26 16:33:40 +00:00
|
|
|
* conference.
|
|
|
|
*
|
|
|
|
* @extends Component
|
|
|
|
*/
|
|
|
|
class TranscribingLabel extends Component<Props> {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
2018-09-12 15:10:12 +00:00
|
|
|
if (!this.props._showLabel) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-07-26 16:33:40 +00:00
|
|
|
return (
|
|
|
|
<Tooltip
|
|
|
|
content = { this.props.t('transcribing.labelToolTip') }
|
|
|
|
position = { 'left' }>
|
|
|
|
<CircularLabel
|
|
|
|
className = 'recording-label'
|
|
|
|
label = { this.props.t('transcribing.tr') } />
|
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-09-12 15:10:12 +00:00
|
|
|
export default translate(connect(_mapStateToProps)(TranscribingLabel));
|