|
650 | 650 | animation: none; |
651 | 651 | } |
652 | 652 |
|
653 | | - /* Deleted comment styling */ |
654 | | - .ck-comment-deleted { |
655 | | - opacity: 0.6; |
656 | | - } |
657 | | -
|
658 | | - .ck-comment-deleted .ck-comment-inner { |
659 | | - background: #fafafa; |
660 | | - border-radius: var(--ck-radius); |
661 | | - padding: 12px; |
662 | | - border: 1px dashed #e5e7eb; |
663 | | - } |
664 | | -
|
665 | 653 | .ck-replies { |
666 | 654 | margin-top: 16px; |
667 | 655 | margin-left: 56px; /* Align with parent comment content */ |
|
1666 | 1654 | const hasReplies = comment.replies && comment.replies.length > 0; |
1667 | 1655 | const replyCount = hasReplies ? comment.replies.length : 0; |
1668 | 1656 | const isExpanded = this.state.expandedReplies.has(comment.id); |
1669 | | - const isPlaceholder = comment.isPlaceholder || false; |
1670 | | - |
1671 | | - // Render placeholder for deleted comments |
1672 | | - if (isPlaceholder) { |
1673 | | - return ` |
1674 | | - <div class="ck-comment ck-comment-deleted" data-id="${comment.id}"> |
1675 | | - <div class="ck-comment-inner"> |
1676 | | - <div class="ck-avatar" style="background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb;"> |
1677 | | - <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> |
1678 | | - <circle cx="12" cy="12" r="10"></circle> |
1679 | | - <line x1="15" y1="9" x2="9" y2="15"></line> |
1680 | | - <line x1="9" y1="9" x2="15" y2="15"></line> |
1681 | | - </svg> |
1682 | | - </div> |
1683 | | - <div class="ck-comment-content"> |
1684 | | - <div class="ck-comment-body" style="color: #9ca3af; font-style: italic;"> |
1685 | | - ${this.escapeHtml(comment.content)} |
1686 | | - </div> |
1687 | | - </div> |
1688 | | - </div> |
1689 | | - ${hasReplies ? ` |
1690 | | - <div class="ck-replies"> |
1691 | | - ${comment.replies.map(r => this.renderComment(r, depth + 1)).join('')} |
1692 | | - </div> |
1693 | | - ` : ''} |
1694 | | - </div> |
1695 | | - `; |
1696 | | - } |
1697 | 1657 |
|
1698 | | - // Regular comment rendering |
| 1658 | + // Regular comment rendering (works for both real and placeholder comments) |
1699 | 1659 | return ` |
1700 | 1660 | <div class="ck-comment" data-id="${comment.id}"> |
1701 | 1661 | <div class="ck-comment-inner"> |
|
2200 | 2160 | // Create a placeholder comment |
2201 | 2161 | const placeholder = { |
2202 | 2162 | id: parentId, |
2203 | | - author_name: '[deleted]', |
| 2163 | + author_name: 'Deleted', |
2204 | 2164 | author_email_hash: null, |
2205 | | - content: '[deleted comment]', |
| 2165 | + content: '[removed]', |
2206 | 2166 | parent_id: null, |
2207 | 2167 | likes: 0, |
2208 | 2168 | user_liked: false, |
2209 | 2169 | created_at: replies[0].created_at, // Use first reply's timestamp |
2210 | 2170 | replies: replies, |
2211 | | - isPlaceholder: true, // Flag to identify placeholders |
2212 | 2171 | }; |
2213 | 2172 |
|
2214 | 2173 | map.set(parentId, placeholder); |
|
0 commit comments