Merge branch 'master' into toxicity-detail

Conflicts:
	plugin-api/beta/client/components/index.js
This commit is contained in:
Chi Vinh Le
2017-10-02 22:27:57 +07:00
20 changed files with 104 additions and 78 deletions
@@ -1,6 +1,7 @@
import React from 'react';
import {Button, Checkbox} from 'coral-ui';
import QuestionBoxBuilder from './QuestionBoxBuilder';
import cn from 'classnames';
import styles from './ConfigureCommentStream.css';
@@ -13,7 +14,7 @@ export default ({handleChange, handleApply, changed, ...props}) => (
<h3>{t('configure.title')}</h3>
<Button
type="submit"
className={styles.apply}
className={cn(styles.apply, 'talk-embed-stream-configuration-submit-button')}
onChange={handleChange}
cStyle={changed ? 'green' : 'darkGrey'} >
{t('configure.apply')}
@@ -102,7 +102,7 @@ class ConfigureStreamContainer extends Component {
const closedTimeout = dirtySettings.closedTimeout;
return (
<div>
<div className='talk-embed-stream-configuration-container'>
<ConfigureCommentStream
handleChange={this.handleChange}
handleApply={this.handleApply}
@@ -16,7 +16,7 @@ import mapValues from 'lodash/mapValues';
import LoadMore from './LoadMore';
import {getEditableUntilDate} from './util';
import {findCommentWithId} from '../graphql/utils';
import CommentContent from './CommentContent';
import CommentContent from 'coral-framework/components/CommentContent';
import Slot from 'coral-framework/components/Slot';
import CommentTombstone from './CommentTombstone';
import InactiveCommentLabel from './InactiveCommentLabel';
@@ -529,7 +529,7 @@ export default class Comment extends React.Component {
<div className={cn(styles.footer, 'talk-stream-comment-footer')}>
{isActive &&
<div className={'talk-stream-comment-actions-container'}>
<div className="commentActionsLeft comment__action-container">
<div className="talk-embed-stream-comment-actions-container-left commentActionsLeft comment__action-container">
<Slot
fill="commentReactions"
{...slotProps}
@@ -545,7 +545,7 @@ export default class Comment extends React.Component {
/>
</ActionButton>}
</div>
<div className="commentActionsRight comment__action-container">
<div className="talk-embed-stream-comment-actions-container-right commentActionsRight comment__action-container">
<Slot
fill="commentActions"
wrapperComponent={ActionButton}
@@ -2,18 +2,18 @@ import React from 'react';
const CommentContent = ({comment}) => {
const textbreaks = comment.body.split('\n');
return <div className={`${name}-text`}>
return <span className={`${name}-text`}>
{
textbreaks.map((line, i) => {
return (
<span key={i} className={`${name}-line`}>
{line}
<br className={`${name}-linebreak`}/>
{i === textbreaks.length - 1 && <br className={`${name}-linebreak`}/>}
</span>
);
})
}
</div>;
</span>;
};
export default CommentContent;
@@ -71,7 +71,7 @@ class ProfileContainer extends Component {
const emailAddress = localProfile && localProfile.id;
return (
<div>
<div className='talk-embed-stream-profile-container'>
<h2>{user.username}</h2>
{emailAddress ? <p>{emailAddress}</p> : null}
+1 -1
View File
@@ -4,7 +4,7 @@ import {Icon} from '../coral-ui';
import styles from './Comment.css';
import Slot from 'coral-framework/components/Slot';
import CommentTimestamp from 'coral-framework/components/CommentTimestamp';
import CommentContent from '../coral-embed-stream/src/components/CommentContent';
import CommentContent from 'coral-framework/components/CommentContent';
import cn from 'classnames';
import {getTotalReactionsCount} from 'coral-framework/utils';
@@ -1,13 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.css';
import cn from 'classnames';
import t from 'coral-framework/services/i18n';
import {BASE_PATH} from 'coral-framework/constants/url';
const ModerationLink = (props) => props.isAdmin ? (
<div className={styles.moderationLink}>
<a href={`${BASE_PATH}admin/moderate/${props.assetId}`} target="_blank">
<div className={cn(styles.moderationLink, 'talk-embed-stream-moderation-container')}>
<a className='talk-embed-stream-moderation-link' href={`${BASE_PATH}admin/moderate/${props.assetId}`} target="_blank">
{t('moderate_this_stream')}
</a>
</div>