mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Readded deleted comments
no issue - Hiding deleted comments caused pagination issues. - Updated text for logged in admins to differentiate between hidden and deleted comments
This commit is contained in:
parent
838fe784f1
commit
2eabb69be3
1 changed files with 5 additions and 7 deletions
|
@ -28,14 +28,12 @@ const Comment = (props) => {
|
|||
const isNotPublished = comment.status !== 'published';
|
||||
const html = {__html: comment.html};
|
||||
|
||||
// Hide a comment if it has been deleted by the user and has no replies
|
||||
// But keep showing comments if hidden by admin and logged in as admin
|
||||
if ((comment.status === 'deleted' && !hasReplies) || (comment.status === 'hidden' && !hasReplies && !admin)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isNotPublished) {
|
||||
html.__html = '<i>This comment has been removed.</i>';
|
||||
if (admin && comment.status === 'hidden') {
|
||||
html.__html = '<i>This comment has been hidden.</i>';
|
||||
} else {
|
||||
html.__html = '<i>This comment has been removed.</i>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isInEditMode) {
|
||||
|
|
Loading…
Add table
Reference in a new issue