feat(life): add comments and replies to life posts

Introduce life_post_comments table for nested comment threads
Add API endpoints to create, reply to, and delete comments
Implement frontend UI with engagement counts and collapsible threads
This commit is contained in:
2026-05-01 21:29:25 +08:00
parent cd1891cc82
commit a683982b80
9 changed files with 854 additions and 6 deletions

View File

@@ -229,6 +229,26 @@ const messages = {
composerPrompt: 'What would you like to share?',
bodyLabel: 'Post',
bodyPlaceholder: 'Share a thought, tip, or discovery...',
comments: 'Comments',
commentsCount: '{count} comments',
comment: 'Comment',
hideComments: 'Hide comments',
commentPlaceholder: 'Write a comment...',
commentReplyPlaceholder: 'Write a reply...',
postComment: 'Post comment',
postingComment: 'Posting comment',
reply: 'Reply',
postReply: 'Post reply',
postingReply: 'Posting reply',
cancelReply: 'Cancel reply',
noComments: 'No comments yet',
deleteComment: 'Delete comment',
deleteCommentConfirm: 'Delete this comment?',
commentDeleted: 'Comment deleted',
commentRequired: 'Please enter a comment.',
commentFailed: 'Comment failed',
replyFailed: 'Reply failed',
deleteCommentFailed: 'Delete comment failed',
publish: 'Post',
publishing: 'Posting',
update: 'Update',
@@ -542,6 +562,26 @@ const messages = {
composerPrompt: '想分享什么?',
bodyLabel: '动态内容',
bodyPlaceholder: '分享一段想法、心得或发现……',
comments: '评论',
commentsCount: '{count} 条评论',
comment: '评论',
hideComments: '收起评论',
commentPlaceholder: '写下评论……',
commentReplyPlaceholder: '写下回复……',
postComment: '发表评论',
postingComment: '评论中',
reply: '回复',
postReply: '发布回复',
postingReply: '回复中',
cancelReply: '取消回复',
noComments: '暂无评论',
deleteComment: '删除评论',
deleteCommentConfirm: '确认删除这条评论?',
commentDeleted: '评论已删除',
commentRequired: '请输入评论内容。',
commentFailed: '评论失败',
replyFailed: '回复失败',
deleteCommentFailed: '删除评论失败',
publish: '发布',
publishing: '发布中',
update: '更新',