From c257379846f2308c69c6546efa6319aecb4fc67f Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 18 Oct 2018 10:14:42 -0400 Subject: [PATCH] Add * to comments from staff on preview This requires the API to include the `is_staff` flag, but it will not change functionality if it is not there, everyone would be considered not staff, which is the current behavior. --- src/views/preview/comment/comment.jsx | 5 ++++- src/views/preview/comment/top-level-comment.jsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index bcd5a6e33..a4405d219 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -111,7 +111,9 @@ class Comment extends React.Component { {author.username} + > + {author.username}{author.is_staff ? '*' : ''} +
{visible ? ( @@ -214,6 +216,7 @@ Comment.propTypes = { author: PropTypes.shape({ id: PropTypes.number, image: PropTypes.string, + is_staff: PropTypes.bool, username: PropTypes.string }), canDelete: PropTypes.bool, diff --git a/src/views/preview/comment/top-level-comment.jsx b/src/views/preview/comment/top-level-comment.jsx index ad09eabbe..c21b1d37b 100644 --- a/src/views/preview/comment/top-level-comment.jsx +++ b/src/views/preview/comment/top-level-comment.jsx @@ -142,6 +142,7 @@ TopLevelComment.propTypes = { author: PropTypes.shape({ id: PropTypes.number, image: PropTypes.string, + is_staff: PropTypes.bool, username: PropTypes.string }), canDelete: PropTypes.bool,