Files
jitsi-meet/react/features/conference/components/web/InsecureRoomNameLabel.tsx

35 lines
1.2 KiB
TypeScript
Raw Normal View History

2020-05-18 14:07:09 +02:00
import React from 'react';
import { connect } from 'react-redux';
2020-05-18 14:07:09 +02:00
import { translate } from '../../../base/i18n/functions';
2022-11-11 09:58:55 +02:00
import { IconExclamationTriangle } from '../../../base/icons/svg';
import Label from '../../../base/label/components/web/Label';
import { COLORS } from '../../../base/label/constants';
import Tooltip from '../../../base/tooltip/components/Tooltip';
import getUnsafeRoomText from '../../../base/util/getUnsafeRoomText.web';
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 {
/**
* Renders the platform dependent content.
2020-05-18 14:07:09 +02:00
*
* @inheritdoc
*/
override _render() {
2020-05-18 14:07:09 +02:00
return (
<Tooltip
content = { getUnsafeRoomText(this.props.t, 'meeting') }
position = 'bottom'>
<Label
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));