Merge branch 'master' into user-sort

This commit is contained in:
Chi Vinh Le
2017-08-24 20:09:44 +07:00
18 changed files with 55 additions and 100 deletions
@@ -6,10 +6,6 @@
position: relative;
}
.body {
}
.footer {
display: flex;
justify-content: space-between;
@@ -35,3 +31,8 @@
padding: 0 2px 0 5px;
vertical-align: middle;
}
.authorName {
margin-right: 5px;
font-weight: bold;
}
@@ -2,13 +2,14 @@ import React from 'react';
import t from 'coral-framework/services/i18n';
import {ReplyButton} from 'talk-plugin-replies';
import PubDate from 'talk-plugin-pubdate/PubDate';
import AuthorName from 'talk-plugin-author-name/AuthorName';
import styles from './FakeComment.css';
import {Icon} from 'plugin-api/beta/client/components/ui';
export const FakeComment = ({username, created_at, body}) => (
<div className={styles.root}>
<AuthorName author={{username}} />
<span className={styles.authorName}>
{username}
</span>;
<PubDate created_at={created_at} />
<div className={styles.body}>
{body}
@@ -64,4 +64,4 @@
.actionsContainer {
text-align: right;
}
}
@@ -2,7 +2,7 @@ import React from 'react';
import cn from 'classnames';
import styles from './Comment.css';
import {t, timeago} from 'plugin-api/beta/client/services';
import {Slot} from 'plugin-api/beta/client/components';
import {Slot, CommentAuthorName} from 'plugin-api/beta/client/components';
import {Icon} from 'plugin-api/beta/client/components/ui';
import {pluginName} from '../../package.json';
@@ -22,9 +22,16 @@ class Comment extends React.Component {
</blockquote>
<div className={cn(`${pluginName}-comment-username-box`)}>
<strong className={cn(styles.username, `${pluginName}-comment-username`)}>
{comment.user.username}
</strong>
<Slot
className={cn(styles.username, `${pluginName}-comment-username`)}
fill="commentAuthorName"
defaultComponent={CommentAuthorName}
queryData={{comment, asset, root}}
data={data}
inline
/>
<span className={cn(styles.timeago, `${pluginName}-comment-timeago`)}>
,{' '}{timeago(comment.created_at)}
</span>
@@ -5,6 +5,7 @@ import {getSlotFragmentSpreads} from 'plugin-api/beta/client/utils';
const slots = [
'commentReactions',
'commentAuthorName',
];
export default withFragments({