Comments on plays
- Anyone who can see a play can read its comments; the player and the people they follow can write. The author, the player and admins can delete; comments can be reported (admins see the text). - Notifications: "commented on" for the player, "replied on" for earlier commenters, each with its own setting. Reaction and comment notifications now open the play. - A 💬 chip with the count next to reactions on the feed and recent plays, opening the thread on the app (/play/[id]) and the website. Threads refresh every few seconds while open. - Blocking removes comments between the two people. Plays with comments survive history trimming. - Privacy page updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Y2iUsKEWDuRGjK5FPmcUP
This commit is contained in:
@@ -62,7 +62,8 @@ export function ProfileMenu({ profile, onChanged }: { profile: ProfileDTO; onCha
|
||||
);
|
||||
}
|
||||
|
||||
function ReportForm({ username, name, onClose }: { username: string; name: string; onClose: () => void }) {
|
||||
/** Report someone's account, or one of their comments (`commentId`). */
|
||||
export function ReportForm({ username, name, commentId, onClose }: { username: string; name: string; commentId?: string; onClose: () => void }) {
|
||||
const [reason, setReason] = useState<ReportReason | null>(null);
|
||||
const [note, setNote] = useState('');
|
||||
const [sent, setSent] = useState(false);
|
||||
@@ -72,7 +73,8 @@ function ReportForm({ username, name, onClose }: { username: string; name: strin
|
||||
e.preventDefault();
|
||||
if (!reason) return;
|
||||
try {
|
||||
await client.report(username, { reason, note: note.trim() || null });
|
||||
const input = { reason, note: note.trim() || null };
|
||||
await (commentId ? client.reportComment(commentId, input) : client.report(username, input));
|
||||
setSent(true);
|
||||
} catch (err) {
|
||||
setError((err as Error).message);
|
||||
@@ -90,7 +92,7 @@ function ReportForm({ username, name, onClose }: { username: string; name: strin
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Modal onClose={onClose} title={`Report ${name}`}>
|
||||
<Modal onClose={onClose} title={commentId ? `Report ${name}'s comment` : `Report ${name}`}>
|
||||
<form className="form" onSubmit={submit}>
|
||||
<fieldset className="choices">
|
||||
<legend className="muted">What's wrong?</legend>
|
||||
|
||||
Reference in New Issue
Block a user