mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 15:36:35 +08:00
Restoring message for suspend
This commit is contained in:
@@ -97,6 +97,7 @@ class SuspendUserDialog extends React.Component {
|
||||
}
|
||||
|
||||
renderStep1() {
|
||||
const {message} = this.state;
|
||||
const {onCancel, username} = this.props;
|
||||
return (
|
||||
<section>
|
||||
@@ -106,14 +107,14 @@ class SuspendUserDialog extends React.Component {
|
||||
<p className={styles.description}>
|
||||
{t('suspenduser.description_notify', username)}
|
||||
</p>
|
||||
{/* <fieldset>
|
||||
<fieldset>
|
||||
<legend className={styles.legend}>{t('suspenduser.write_message')}</legend>
|
||||
<textarea
|
||||
rows={5}
|
||||
className={styles.messageInput}
|
||||
value={message}
|
||||
onChange={this.handleMessageChange} />
|
||||
</fieldset> */}
|
||||
</fieldset>
|
||||
<div className={styles.buttons}>
|
||||
<Button cStyle="white" className={styles.cancel} onClick={onCancel} raised>
|
||||
{t('suspenduser.cancel')}
|
||||
|
||||
@@ -14,11 +14,11 @@ import {notify} from 'coral-framework/actions/notification';
|
||||
|
||||
class SuspendUserDialogContainer extends Component {
|
||||
|
||||
suspendUser = async ({until}) => {
|
||||
suspendUser = async ({message, until}) => {
|
||||
const {userId, username, commentStatus, commentId, hideSuspendUserDialog, setCommentStatus, suspendUser, notify} = this.props;
|
||||
hideSuspendUserDialog();
|
||||
try {
|
||||
await suspendUser({id: userId, until});
|
||||
await suspendUser({id: userId, message, until});
|
||||
notify(
|
||||
'success',
|
||||
t('suspenduser.notify_suspend_until', username, timeago(until)),
|
||||
|
||||
Reference in New Issue
Block a user