您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

InsecureRoomNameLabel.js 1.0KB

12345678910111213141516171819202122232425262728293031323334
  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 { CircularLabel } from '../../../base/label';
  7. import { connect } from '../../../base/redux';
  8. import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
  9. /**
  10. * Renders a label indicating that we are in a room with an insecure name.
  11. */
  12. class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
  13. /**
  14. * Renders the platform dependant content.
  15. *
  16. * @inheritdoc
  17. */
  18. _render() {
  19. return (
  20. <Tooltip
  21. content = { this.props.t('security.insecureRoomNameWarning') }
  22. position = 'left'>
  23. <CircularLabel
  24. className = 'insecure'
  25. icon = { IconWarning } />
  26. </Tooltip>
  27. );
  28. }
  29. }
  30. export default translate(connect(_mapStateToProps)(InsecureRoomNameLabel));