feat: added author label markers to UI

feat: added author label markers to UI

feat: added author label to message.postedOn object

feat: added author label to reply component

fix: changed bracket for author label in reply component

fix:fixed lint error
This commit is contained in:
tinumide
2021-09-03 22:09:19 +00:00
parent a380ee3b1b
commit 9a4fe0fdb3
3 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ function ReplyHeader({ reply, intl }) {
<div className="status small">
<a href="#nowhere">
<h1 className="font-weight-normal text-info-300 mr-1 small">
{reply.author}
{reply.author} {reply.authorLabel ? `(${reply.authorLabel})` : '' }
</h1>
</a>
<h2 className="font-weight-normal small text-gray-500" title={reply.createdAt}>

View File

@@ -74,6 +74,7 @@ function PostHeader({
{
author: post.author,
time: timeago.format(post.createdAt, intl.locale),
authorLabel: post.authorLabel ? `(${post.authorLabel})` : '',
},
)}
</span>

View File

@@ -7,7 +7,7 @@ const messages = defineMessages({
},
postedOn: {
id: 'discussions.post.posted-on',
defaultMessage: 'Posted {time} by {author}',
defaultMessage: 'Posted {time} by {author} {authorLabel}',
},
contentReported: {
id: 'discussions.post.content-reported',