merge master

This commit is contained in:
riley
2017-05-16 09:43:49 -06:00
231 changed files with 4339 additions and 1834 deletions
@@ -28,11 +28,11 @@ const Comment = ({
...props
}) => {
const links = linkify.getMatches(comment.body);
const linkText = links ? links.map(link => link.raw) : [];
const linkText = links ? links.map((link) => link.raw) : [];
const flagActionSummaries = getActionSummary('FlagActionSummary', comment);
const flagActions =
comment.actions &&
comment.actions.filter(a => a.__typename === 'FlagAction');
comment.actions.filter((a) => a.__typename === 'FlagAction');
let commentType = '';
if (comment.status === 'PREMOD') {
commentType = 'premod';
@@ -44,7 +44,7 @@ const Comment = ({
// this should be the behavior on the front end as well.
// currently the highlighter plugin does not support this out of the box.
const searchWords = [...suspectWords, ...bannedWords]
.filter(w => {
.filter((w) => {
return new RegExp(`(^|\\s)${w}(\\s|$)`).test(comment.body);
})
.concat(linkText);
@@ -2,7 +2,7 @@ import React, {PropTypes} from 'react';
import styles from './CommentType.css';
import {Icon} from 'coral-ui';
const CommentType = props => {
const CommentType = (props) => {
const typeData = getTypeData(props.type);
return (
@@ -12,7 +12,7 @@ const CommentType = props => {
);
};
const getTypeData = type => {
const getTypeData = (type) => {
switch (type) {
case 'premod':
return {icon: 'query_builder', text: 'Pre-Mod', className: 'premod'};
@@ -55,7 +55,7 @@ class FlagBox extends Component {
<ul>
{actionSummaries.map((summary, i) => {
const actionList = actions.filter(a => a.reason === summary.reason);
const actionList = actions.filter((a) => a.reason === summary.reason);
return (
<li key={i}>
@@ -3,7 +3,7 @@ import {Link} from 'react-router';
import {Icon} from 'coral-ui';
import styles from './styles.css';
const ModerationHeader = props => (
const ModerationHeader = (props) => (
<div className=''>
<div className={`mdl-tabs ${styles.header}`}>
{
@@ -57,7 +57,7 @@ const ModerationMenu = (
className={styles.selectField}
label="Sort"
value={sort}
onChange={sort => selectSort(sort)}>
onChange={(sort) => selectSort(sort)}>
<Option value={'REVERSE_CHRONOLOGICAL'}>Newest First</Option>
<Option value={'CHRONOLOGICAL'}>Oldest First</Option>
</SelectField>
@@ -2,7 +2,7 @@ import React from 'react';
import {Link} from 'react-router';
import styles from './styles.css';
const NotFound = props => (
const NotFound = (props) => (
<div className={`mdl-card mdl-shadow--2dp ${styles.notFound}`}>
<p>
The provided asset id <Link to={`/admin/moderate/${props.assetId}`}>{props.assetId}</Link> does not exist.