mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -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,15 +28,13 @@ const Comment = (props) => {
|
||||||
const isNotPublished = comment.status !== 'published';
|
const isNotPublished = comment.status !== 'published';
|
||||||
const html = {__html: comment.html};
|
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) {
|
if (isNotPublished) {
|
||||||
|
if (admin && comment.status === 'hidden') {
|
||||||
|
html.__html = '<i>This comment has been hidden.</i>';
|
||||||
|
} else {
|
||||||
html.__html = '<i>This comment has been removed.</i>';
|
html.__html = '<i>This comment has been removed.</i>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isInEditMode) {
|
if (isInEditMode) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue