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.

InsecureRoomNameLabel.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. // @flow
  2. import Tooltip from '@atlaskit/tooltip';
  3. import React from 'react';
  4. import { translate } from '../../../base/i18n';
  5. import { IconWarning } from '../../../base/icons';
  6. import { Label } from '../../../base/label';
  7. import { COLORS } from '../../../base/label/constants';
  8. import { connect } from '../../../base/redux';
  9. import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
  10. /**
  11. * Renders a label indicating that we are in a room with an insecure name.
  12. */
  13. class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
  14. /**
  15. * Renders the platform dependent content.
  16. *
  17. * @inheritdoc
  18. */
  19. _render() {
  20. return (
  21. <Tooltip
  22. content = { this.props.t('security.insecureRoomNameWarning') }
  23. position = 'bottom'>
  24. <Label
  25. color = { COLORS.red }
  26. icon = { IconWarning } />
  27. </Tooltip>
  28. );
  29. }
  30. }
  31. export default translate(connect(_mapStateToProps)(InsecureRoomNameLabel));