You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

E2EELabel.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import Tooltip from '@atlaskit/tooltip';
  3. import React, { Component } from 'react';
  4. import { translate } from '../../base/i18n';
  5. import { IconE2EE } from '../../base/icons';
  6. import { CircularLabel } from '../../base/label';
  7. import { connect } from '../../base/redux';
  8. import { _mapStateToProps, type Props } from './AbstractE2EELabel';
  9. /**
  10. * React {@code Component} for displaying a label when everyone has E2EE enabled in a conferene.
  11. *
  12. * @extends Component
  13. */
  14. class E2EELabel extends Component<Props> {
  15. /**
  16. * Implements React's {@link Component#render()}.
  17. *
  18. * @inheritdoc
  19. * @returns {ReactElement}
  20. */
  21. render() {
  22. if (!this.props._showLabel) {
  23. return null;
  24. }
  25. return (
  26. <Tooltip
  27. content = { this.props.t('e2ee.labelToolTip') }
  28. position = { 'left' }>
  29. <CircularLabel
  30. className = 'e2ee'
  31. icon = { IconE2EE } />
  32. </Tooltip>
  33. );
  34. }
  35. }
  36. export default translate(connect(_mapStateToProps)(E2EELabel));