v3: follows, notifications, invite-only registration, unread markers

This commit is contained in:
khannurien
2026-03-21 18:42:47 +00:00
parent 7c098e7c4c
commit 608c6bc6a8
55 changed files with 4743 additions and 884 deletions

View File

@@ -105,7 +105,10 @@ function CommentNode({
<li className="comment-node">
<div className="comment-node-inner comment-node-inner--deleted">
<div className="comment-avatar comment-avatar--deleted">
<div className="comment-avatar-placeholder" style={{ width: 28, height: 28 }} />
<div
className="comment-avatar-placeholder"
style={{ width: 28, height: 28 }}
/>
</div>
<div className="comment-content">
<p className="comment-deleted-placeholder">[deleted]</p>
@@ -194,14 +197,14 @@ function CommentNode({
value={replyBody}
onChange={(e) => setReplyBody(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) handleReply(e);
if (
e.key === "Enter" && (e.ctrlKey || e.metaKey)
) handleReply(e);
}}
placeholder="Write a reply…"
rows={3}
/>
{replyError && (
<p className="comment-form-error">{replyError}</p>
)}
{replyError && <p className="comment-form-error">{replyError}</p>}
<div className="comment-form-actions">
<button
type="submit"
@@ -229,9 +232,7 @@ function CommentNode({
{children.length > 0 && (
<ul
className="comment-replies"
style={depth >= MAX_INDENT_DEPTH
? { paddingLeft: 0 }
: undefined}
style={depth >= MAX_INDENT_DEPTH ? { paddingLeft: 0 } : undefined}
>
{children.map((child) => (
<CommentNode
@@ -305,13 +306,18 @@ export function CommentThread({
</h2>
{currentUser && (
<form className="comment-form comment-top-form" onSubmit={handleTopLevelSubmit}>
<form
className="comment-form comment-top-form"
onSubmit={handleTopLevelSubmit}
>
<textarea
className="comment-reply-textarea"
value={topLevelBody}
onChange={(e) => setTopLevelBody(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) handleTopLevelSubmit(e);
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
handleTopLevelSubmit(e);
}
}}
placeholder="Add a comment…"
rows={3}