mirror of
https://github.com/wassname/talk.git
synced 2026-08-14 12:50:17 +08:00
Show notification on success
This commit is contained in:
@@ -4,11 +4,14 @@ import {compose, gql} from 'react-apollo';
|
||||
import {connect, withFragments, withIgnoreUser} from 'plugin-api/beta/client/hocs';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {closeMenu} from 'plugins/talk-plugin-author-menu/client/actions';
|
||||
import {notify} from 'plugin-api/beta/client/actions/notification';
|
||||
import {t} from 'plugin-api/beta/client/services';
|
||||
|
||||
class IgnoreUserConfirmationContainer extends React.Component {
|
||||
|
||||
ignoreUser = () => {
|
||||
this.props.ignoreUser(this.props.comment.user.id);
|
||||
this.props.notify('success', t('talk-plugin-ignore-user.notify_success', this.props.comment.user.username));
|
||||
this.props.closeMenu();
|
||||
};
|
||||
|
||||
@@ -28,6 +31,7 @@ class IgnoreUserConfirmationContainer extends React.Component {
|
||||
const mapDispatchToProps = (dispatch) =>
|
||||
bindActionCreators({
|
||||
closeMenu,
|
||||
notify,
|
||||
}, dispatch);
|
||||
|
||||
const withIgnoreUserConfirmationFragments = withFragments({
|
||||
|
||||
@@ -5,5 +5,7 @@ en:
|
||||
confirmation: |
|
||||
When you ignore a user, all comments they wrote on the site will be hidden from you. You can
|
||||
undo this later from My Profile.
|
||||
notify_success: |
|
||||
You are now ignoring {0}. You can undo this action from My Profile.
|
||||
es:
|
||||
talk-plugin-ignore-user:
|
||||
|
||||
Reference in New Issue
Block a user