2019-10-07 12:35:04 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-10-04 09:44:48 +00:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
import { connect } from '../../../base/redux/functions';
|
|
|
|
import Dialog from '../../../base/ui/components/web/Dialog';
|
2019-10-07 12:35:04 +00:00
|
|
|
import { AbstractChatPrivacyDialog, _mapDispatchToProps, _mapStateToProps } from '../AbstractChatPrivacyDialog';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a component for the dialog displayed to avoid mis-sending private messages.
|
|
|
|
*/
|
|
|
|
class ChatPrivacyDialog extends AbstractChatPrivacyDialog {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Dialog
|
2022-10-04 09:44:48 +00:00
|
|
|
cancel = {{ translationKey: 'dialog.sendPrivateMessageCancel' }}
|
|
|
|
ok = {{ translationKey: 'dialog.sendPrivateMessageOk' }}
|
2019-10-07 12:35:04 +00:00
|
|
|
onCancel = { this._onSendGroupMessage }
|
|
|
|
onSubmit = { this._onSendPrivateMessage }
|
2022-10-04 09:44:48 +00:00
|
|
|
titleKey = 'dialog.sendPrivateMessageTitle'>
|
2019-10-07 12:35:04 +00:00
|
|
|
<div>
|
|
|
|
{ this.props.t('dialog.sendPrivateMessage') }
|
|
|
|
</div>
|
|
|
|
</Dialog>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(ChatPrivacyDialog));
|