2019-10-07 14:35:04 +02:00
|
|
|
import React from 'react';
|
2023-03-21 09:47:52 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-10-07 14:35:04 +02:00
|
|
|
|
2023-03-31 14:04:33 +03:00
|
|
|
import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
|
2019-10-07 14:35:04 +02:00
|
|
|
import { translate } from '../../../base/i18n';
|
|
|
|
|
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 (
|
|
|
|
|
<ConfirmDialog
|
2022-02-03 17:45:02 +02:00
|
|
|
cancelLabel = 'dialog.sendPrivateMessageCancel'
|
|
|
|
|
confirmLabel = 'dialog.sendPrivateMessageOk'
|
|
|
|
|
descriptionKey = 'dialog.sendPrivateMessage'
|
2019-10-07 14:35:04 +02:00
|
|
|
onCancel = { this._onSendGroupMessage }
|
|
|
|
|
onSubmit = { this._onSendPrivateMessage } />
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_onSendGroupMessage: () => boolean;
|
|
|
|
|
|
|
|
|
|
_onSendPrivateMessage: () => boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(ChatPrivacyDialog));
|