Merge branch 'master' into no-username-alias

This commit is contained in:
Kiwi
2017-06-28 16:37:01 +07:00
committed by GitHub
6 changed files with 33 additions and 15 deletions
@@ -2,17 +2,18 @@ import React from 'react';
import styles from './Community.css';
import ActionButton from './ActionButton';
import {username} from 'coral-plugin-flags/helpers/flagReasons';
import ActionsMenu from 'coral-admin/src/components/ActionsMenu';
import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem';
import t from 'coral-framework/services/i18n';
const shortReasons = {
'This comment is offensive': t('community.offensive'),
'This looks like an ad/marketing': t('community.spam_ads'),
'This user is impersonating': t('community.impersonating'),
'I don\'t like this username': t('community.dont_like_username'),
'Other': t('community.other')
[username.other]: t('community.other'),
[username.spam]: t('community.spam_ads'),
[username.offensive]: t('community.offensive'),
[username.nolike]: t('community.dont_like_username'),
[username.impersonating]: t('community.impersonating'),
};
// Render a single user for the list
@@ -4,7 +4,7 @@ import AuthorName from 'coral-plugin-author-name/AuthorName';
import TagLabel from 'coral-plugin-tag-label/TagLabel';
import PubDate from 'coral-plugin-pubdate/PubDate';
import {ReplyBox, ReplyButton} from 'coral-plugin-replies';
import FlagComment from 'coral-plugin-flags/FlagComment';
import {FlagComment} from 'coral-plugin-flags';
import {can} from 'coral-framework/services/perms';
import {TransitionGroup} from 'react-transition-group';
import cn from 'classnames';
@@ -2,6 +2,7 @@ import React from 'react';
import FlagButton from './FlagButton';
import t from 'coral-framework/services/i18n';
import {username, comment} from '../helpers/flagReasons';
const FlagComment = (props) => <FlagButton {...props} getPopupMenu={getPopupMenu} />;
@@ -20,17 +21,17 @@ const getPopupMenu = [
(itemType) => {
const options = itemType === 'COMMENTS' ?
[
{val: 'This comment is offensive', text: t('comment_offensive')},
{val: 'This looks like an ad/marketing', text: t('marketing')},
{val: 'I don\'t agree with this comment', text: t('no_agree_comment')},
{val: 'Other', text: t('other')}
{val: comment.offensive, text: t('comment_offensive')},
{val: comment.spam, text: t('marketing')},
{val: comment.noagree, text: t('no_agree_comment')},
{val: comment.other, text: t('other')}
]
: [
{val: 'This username is offensive', text: t('username_offensive')},
{val: 'I don\'t like this username', text: t('no_like_username')},
{val: 'This user is impersonating', text: t('user_impersonating')},
{val: 'This looks like an ad/marketing', text: t('marketing')},
{val: 'Other', text: t('other')}
{val: username.offensive, text: t('username_offensive')},
{val: username.nolike, text: t('no_like_username')},
{val: username.impersonating, text: t('user_impersonating')},
{val: username.spam, text: t('marketing')},
{val: username.other, text: t('other')}
];
return {
header: t('step_2_header'),
@@ -0,0 +1,15 @@
export default {
username: {
offensive: 'USERNAME_OFFENSIVE',
nolike: 'USERNAME_NOLIKE',
impersonating: 'USERNAME_IMPERSONATING',
spam: 'USERNAME_SPAM',
other: 'USERNAME_OTHER'
},
comment: {
offensive: 'COMMENT_OFFENSIVE',
spam: 'COMMENT_SPAM',
noagree: 'COMMENT_NOAGREE',
other: 'COMMENT_OTHER'
}
};
+1
View File
@@ -0,0 +1 @@
export {default as FlagComment} from './components/FlagComment';