Forum: whom a reply answers, icon badges, the new features on the pages

- Replies stay two levels deep, but a reply to a reply says whom it is
  for ("↪ Holdfény"): posts.reply_to_id.
- The question stands apart on its own card; the listening reminder above
  the reply box is gone.
- Every rank and badge has its own line icon (Vándor, Kereső, Fonó,
  Csillagfonó, Sorsfonó; Moderátor, Meghallgató, Támogató, Szálindító).
- Pages for the new features: own avatar upload and the moderator's reset,
  the listener and supporter switches, mention and weekly summary e-mails
  (the weekly one off by default), "@" suggestions and mention links, the
  daily sky thread by "Sorsfonalak", "Most itt vannak", joining restricted
  topics, and the moderators' Témák tab (requests; topics for the admin).
- Members-only topics say so to members too.
- The privacy notice (HU, EN) and point 8.1 of the terms cover own
  pictures, badges, mentions, restricted topics and the weekly summary;
  the data export and account deletion include them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-26 13:02:38 +00:00
co-authored by Claude Opus 5.5
parent 564c22176f
commit 8bc426460d
28 changed files with 1112 additions and 100 deletions
@@ -14,6 +14,7 @@ import type { LiveNotice } from "./ForumNav";
import { ReactionIcon } from "./ReactionIcon";
import { ReportForm } from "./ReportButton";
import { TypingLine, useTypingSender, useTypingWatch } from "./typing";
import { Badge, RankBadge } from "./Badges";
/** How often the open thread looks for new replies (while the page is in front). */
const POLL_MS = 30_000;
@@ -154,6 +155,21 @@ function Popover({
);
}
/** The site's own mark as an avatar (the daily sky thread). */
function SiteMark({ size }: { size: number }) {
return (
<span className="av av-site" style={{ width: size, height: size }}>
<svg viewBox="0 0 64 64" width={size} height={size} aria-hidden="true">
<circle cx="32" cy="32" r="32" className="av-bg" />
<g fill="none" strokeWidth="4.5" strokeLinecap="round" className="av-site-mark">
<circle cx="32" cy="32" r="18" />
<path d="M15 43 C 26 42, 30 25, 42 21" />
</g>
</svg>
</span>
);
}
function PostCard({
post,
page,
@@ -210,7 +226,9 @@ function PostCard({
return (
<article className={classes} id={`h${post.id}`}>
<span className="fp-av">
{author ? (
{post.system ? (
<SiteMark size={size} />
) : author ? (
<Link href={memberHref(author.nickname)} tabIndex={-1} aria-hidden="true">
<Avatar avatar={author.avatar} size={size} online={author.online} />
</Link>
@@ -220,17 +238,32 @@ function PostCard({
</span>
<div className="fp-head">
<span className="fp-names">
{author ? (
{post.system ? (
<span className="fa-name">Sorsfonalak</span>
) : author ? (
<Link href={memberHref(author.nickname)} className="fa-name">
{author.nickname}
</Link>
) : (
<span className="fa-name muted">Törölt tag</span>
)}
{post.reply_to?.nickname && nested && (
<span className="fp-replyto" title={`Válasz neki: ${post.reply_to.nickname}`}>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M9 14L4 9l5-5" />
<path d="M4 9h10a6 6 0 0 1 6 6v4" />
</svg>
<span className="sr-only">válasz neki:</span>
{post.reply_to.nickname}
</span>
)}
{author?.online && <span className="sr-only">(online)</span>}
{author && <span className="fa-rank">{author.rank_name}</span>}
{author?.moderator && <span className="fa-badge fa-badge-mod">Moderátor</span>}
{starter && !post.is_opening && <span className="fa-badge fa-badge-starter">Szálindító</span>}
{author && <RankBadge rank={author.rank} name={author.rank_name} />}
{post.system && <Badge kind="sky" />}
{author?.moderator && <Badge kind="mod" />}
{author?.listener && <Badge kind="listener" />}
{author?.supporter && <Badge kind="supporter" />}
{starter && !post.is_opening && <Badge kind="starter" />}
{isNew && <span className="fa-badge fa-badge-new">új</span>}
{glyphs && !nested && (
<span className="fp-signs sym" title={glyphs.title}>
@@ -261,6 +294,7 @@ function PostCard({
</button>
) : editing ? (
<Composer
mentions
id={`szerk-${post.id}`}
label="Hozzászólás szerkesztése"
initial={post.body ?? ""}
@@ -275,7 +309,7 @@ function PostCard({
}}
/>
) : (
post.body !== null && <PostBody text={post.body} />
post.body !== null && <PostBody text={post.body} mentions={post.mentions} />
)}
</div>
{!editing && (!post.deleted || menuItems.length > 0) && (
@@ -529,6 +563,22 @@ export function ThreadView({ initial }: { initial: ThreadPage }) {
<Link href="/forum">Fórum</Link>
<span aria-hidden="true">›</span>
<Link href={`/forum/${thread.topic.slug}`}>{thread.topic.name}</Link>
{thread.topic.visibility !== "public" && (
<span
className="ftv-private"
title={
thread.topic.visibility === "members"
? "Csak belépett tagok látják, a keresők sem"
: "Zárt kör: csak a jóváhagyott tagok látják"
}
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<rect x="5" y="11" width="14" height="9" rx="2" />
<path d="M8 11V8a4 4 0 0 1 8 0v3" />
</svg>
{thread.topic.visibility === "members" ? "csak tagoknak" : "zárt kör"}
</span>
)}
</nav>
<div className="ftv-toolbar">
@@ -649,12 +699,6 @@ export function ThreadView({ initial }: { initial: ThreadPage }) {
<p className="ftv-gate">Ez a szál le van zárva, új hozzászólás nem írható.</p>
) : (
<>
{thread.intent === "listen" && (
<p className="ftv-hint">
{starter} meghallgatást kér: tanács helyett írd le, ha veled is történt hasonló, vagy csak azt, hogy itt
vagy.
</p>
)}
{replyTo && (
<p className="ftv-replyto">
Válasz neki: <strong>{replyTo.author?.nickname ?? "Törölt tag"}</strong>
@@ -669,6 +713,7 @@ export function ThreadView({ initial }: { initial: ThreadPage }) {
</p>
)}
<Composer
mentions
onTyping={imTyping}
id="valasz-szoveg"
label="Válaszod"