mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
Displaying comment author names.
This commit is contained in:
@@ -11,6 +11,7 @@ import Content from '../../coral-plugin-commentcontent/CommentContent'
|
||||
import PubDate from '../../coral-plugin-pubdate/PubDate'
|
||||
import Count from '../../coral-plugin-comment-count/CommentCount'
|
||||
import Flag from '../../coral-plugin-flags/FlagButton'
|
||||
import AuthorName from '../../coral-plugin-author-name/AuthorName'
|
||||
import {ReplyBox, ReplyButton} from '../../coral-plugin-replies'
|
||||
import Pym from 'pym.js'
|
||||
|
||||
@@ -117,6 +118,7 @@ class CommentStream extends Component {
|
||||
const comment = this.props.items[commentId]
|
||||
return <div className="comment">
|
||||
<hr aria-hidden={true}/>
|
||||
<AuthorName name={comment.username}/>
|
||||
<PubDate created_at={comment.created_at}/>
|
||||
<Content content={comment.body}/>
|
||||
<div className="commentActions">
|
||||
@@ -143,6 +145,7 @@ class CommentStream extends Component {
|
||||
let reply = this.props.items[replyId]
|
||||
return <div className="reply">
|
||||
<hr aria-hidden={true}/>
|
||||
<AuthorName name={reply.username}/>
|
||||
<PubDate created_at={reply.created_at}/>
|
||||
<Content content={reply.body}/>
|
||||
<div className="replyActions">
|
||||
|
||||
@@ -90,6 +90,10 @@ hr {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.coral-plugin-author-name-text {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* Reply styles */
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
const name = 'coral-plugin-author-name'
|
||||
|
||||
const AuthorName = ({name}) =>
|
||||
<div className={name + '-text'}>
|
||||
{name}
|
||||
</div>
|
||||
|
||||
export default AuthorName
|
||||
Reference in New Issue
Block a user