clickToUserProfile(comment.user.username)} className="cursor-pointer fade-in">
+ {getGravatarByUser(comment.user)}
+
+
clickToUserProfile(comment.user.username)} className="font-bold text-base text-slate-800 dark:text-slate-100 cursor-pointer fade-in-up">{comment.user.nickname}
+
+ {
+ isPrivate &&
+ }
+ {
+ parentComment &&
+ <>{t("reply")} : >
+ }
+ {comment.content}
+
+
+
{new Date(comment.updatedAt).toLocaleString()}
+ {/* 点赞按钮 */}
+
- {/* 回复按钮 */}
-
+ {/* 回复按钮 */}
+
- {/* 编辑和删除按钮 仅自己的评论可见 */}
- {user?.id === comment.user.id && (
- <>
-
+
+ {/* 编辑和删除按钮 仅自己的评论可见 */}
+ {user?.id === comment.user.id && (
+ <>
+
+ onClick={() => { setShowEditInput(!showEditInput); setShowReplyInput(false); }}
+ >
+
+
-
+ >
+ )}
+
+ {replyCount > 0 &&
+
- >
- )}
-
- {replyCount > 0 &&
-
- }
-
- {/* 这俩输入框一次只能显示一个 */}
- {showReplyInput && !showEditInput &&
}
- {showEditInput && !showReplyInput &&
}
- {showReplies && replies.length > 0 && (
-
- {replies.map((reply) => (
-
- ))}
+ }
- )}
-