2020-05-18 14:07:09 +02:00
|
|
|
import React from 'react';
|
2023-02-03 13:31:00 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-05-18 14:07:09 +02:00
|
|
|
|
2023-02-03 13:31:00 +02:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
2022-11-11 09:58:55 +02:00
|
|
|
import { IconExclamationTriangle } from '../../../base/icons/svg';
|
2023-02-03 13:31:00 +02:00
|
|
|
import Label from '../../../base/label/components/web/Label';
|
2021-09-29 15:06:03 +03:00
|
|
|
import { COLORS } from '../../../base/label/constants';
|
2023-03-17 12:23:51 +02:00
|
|
|
import Tooltip from '../../../base/tooltip/components/Tooltip';
|
2020-05-18 14:07:09 +02:00
|
|
|
import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Renders a label indicating that we are in a room with an insecure name.
|
|
|
|
|
*/
|
|
|
|
|
class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
|
|
|
|
|
/**
|
2021-03-16 11:59:33 -04:00
|
|
|
* Renders the platform dependent content.
|
2020-05-18 14:07:09 +02:00
|
|
|
*
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
*/
|
|
|
|
|
_render() {
|
|
|
|
|
return (
|
|
|
|
|
<Tooltip
|
|
|
|
|
content = { this.props.t('security.insecureRoomNameWarning') }
|
2021-04-08 11:35:26 +03:00
|
|
|
position = 'bottom'>
|
|
|
|
|
<Label
|
2021-09-29 15:06:03 +03:00
|
|
|
color = { COLORS.red }
|
2022-11-11 09:58:55 +02:00
|
|
|
icon = { IconExclamationTriangle } />
|
2020-05-18 14:07:09 +02:00
|
|
|
</Tooltip>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(InsecureRoomNameLabel));
|