Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

E2EELabel.tsx 941B

1234567891011121314151617181920212223242526272829303132
  1. import React from 'react';
  2. import { connect } from 'react-redux';
  3. import { translate } from '../../base/i18n/functions';
  4. import { IconE2EE } from '../../base/icons/svg';
  5. import Label from '../../base/label/components/web/Label';
  6. import { COLORS } from '../../base/label/constants';
  7. // eslint-disable-next-line lines-around-comment
  8. // @ts-ignore
  9. import { Tooltip } from '../../base/tooltip';
  10. import { IProps, _mapStateToProps } from './AbstractE2EELabel';
  11. const E2EELabel = ({ _e2eeLabels, _showLabel, t }: IProps) => {
  12. if (!_showLabel) {
  13. return null;
  14. }
  15. const content = _e2eeLabels?.labelToolTip || t('e2ee.labelToolTip');
  16. return (
  17. <Tooltip
  18. content = { content }
  19. position = { 'bottom' }>
  20. <Label
  21. color = { COLORS.green }
  22. icon = { IconE2EE } />
  23. </Tooltip>
  24. );
  25. };
  26. export default translate(connect(_mapStateToProps)(E2EELabel));