summaryrefslogtreecommitdiffstats
path: root/ui/src/components/comment-node.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/comment-node.tsx')
-rw-r--r--ui/src/components/comment-node.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index a4e398f1..b45f13fc 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -33,6 +33,7 @@ interface CommentNodeProps {
markable?: boolean;
moderators: Array<CommunityUser>;
admins: Array<UserView>;
+ postCreatorId?: number;
}
export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
@@ -87,6 +88,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
{this.isAdmin &&
<li className="list-inline-item badge badge-light"><T i18nKey="admin">#</T></li>
}
+ {this.isPostCreator &&
+ <li className="list-inline-item badge badge-light"><T i18nKey="creator">#</T></li>
+ }
{(node.comment.banned_from_community || node.comment.banned) &&
<li className="list-inline-item badge badge-danger"><T i18nKey="banned">#</T></li>
}
@@ -255,6 +259,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
locked={this.props.locked}
moderators={this.props.moderators}
admins={this.props.admins}
+ postCreatorId={this.props.postCreatorId}
/>
}
{/* A collapsed clearfix */}
@@ -275,6 +280,10 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
return this.props.admins && isMod(this.props.admins.map(a => a.id), this.props.node.comment.creator_id);
}
+ get isPostCreator(): boolean {
+ return this.props.node.comment.creator_id == this.props.postCreatorId;
+ }
+
get canMod(): boolean {
if (this.props.admins && this.props.moderators) {