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:
@@ -2,6 +2,8 @@ import Link from "next/link";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { Avatar } from "@/components/forum/Avatar";
|
||||
import { RankBadge } from "@/components/forum/Badges";
|
||||
import { JoinTopic } from "@/components/forum/JoinTopic";
|
||||
import { ThreadList, WaitingCard } from "@/components/forum/ThreadList";
|
||||
import { MoonPhaseIcon } from "@/components/MoonChip";
|
||||
import { MOON_PHASES, SIGNS } from "@/lib/astro";
|
||||
@@ -161,47 +163,72 @@ export default async function ForumHomePage() {
|
||||
<h2 id="fh-topics">Témák</h2>
|
||||
</div>
|
||||
<ul className="fh-card fh-flush fh-topics">
|
||||
{topics.map((t) => (
|
||||
<li key={t.slug}>
|
||||
<Link href={t.readable ? `/forum/${t.slug}` : `/belepes?vissza=/forum/${t.slug}`} className="fh-topic">
|
||||
<span className="fh-topic-icon">
|
||||
<TopicIcon slug={t.slug} />
|
||||
</span>
|
||||
<span className="fh-topic-text">
|
||||
<span className="fh-topic-name">
|
||||
{t.name}
|
||||
{t.visibility !== "public" && (
|
||||
<svg viewBox="0 0 24 24" className="fh-lock" role="img" aria-label="Csak tagoknak">
|
||||
{topics.map((t) =>
|
||||
t.visibility === "restricted" && !t.readable ? (
|
||||
<li key={t.slug}>
|
||||
<div className="fh-topic fh-topic-closed">
|
||||
<span className="fh-topic-icon">
|
||||
<TopicIcon slug={t.slug} />
|
||||
</span>
|
||||
<span className="fh-topic-text">
|
||||
<span className="fh-topic-name">
|
||||
{t.name}
|
||||
<svg viewBox="0 0 24 24" className="fh-lock" role="img" aria-label="Zárt téma">
|
||||
<rect x="5" y="11" width="14" height="9" rx="2" />
|
||||
<path d="M8 11V8a4 4 0 0 1 8 0v3" />
|
||||
</svg>
|
||||
)}
|
||||
</span>
|
||||
<span className="fh-topic-desc">{t.description}</span>
|
||||
<span className="fh-topic-last">Zárt kör: jóváhagyás után olvasható</span>
|
||||
</span>
|
||||
<span className="fh-topic-desc">{t.description}</span>
|
||||
{t.readable && t.last && (
|
||||
<span className="fh-topic-last">
|
||||
{t.last.author && (
|
||||
<Avatar avatar={t.last.author.avatar} size={18} online={t.last.author.online} />
|
||||
{viewer.member && <JoinTopic slug={t.slug} pending={t.membership === "pending"} />}
|
||||
</div>
|
||||
</li>
|
||||
) : (
|
||||
<li key={t.slug}>
|
||||
<Link
|
||||
href={t.readable ? `/forum/${t.slug}` : `/belepes?vissza=/forum/${t.slug}`}
|
||||
className="fh-topic"
|
||||
>
|
||||
<span className="fh-topic-icon">
|
||||
<TopicIcon slug={t.slug} />
|
||||
</span>
|
||||
<span className="fh-topic-text">
|
||||
<span className="fh-topic-name">
|
||||
{t.name}
|
||||
{t.visibility !== "public" && (
|
||||
<svg viewBox="0 0 24 24" className="fh-lock" role="img" aria-label="Csak tagoknak">
|
||||
<rect x="5" y="11" width="14" height="9" rx="2" />
|
||||
<path d="M8 11V8a4 4 0 0 1 8 0v3" />
|
||||
</svg>
|
||||
)}
|
||||
{t.last.author?.nickname ?? "Törölt tag"},{" "}
|
||||
<time suppressHydrationWarning dateTime={t.last.at}>
|
||||
{ago(t.last.at)}
|
||||
</time>
|
||||
</span>
|
||||
<span className="fh-topic-desc">{t.description}</span>
|
||||
{t.readable && t.last && (
|
||||
<span className="fh-topic-last">
|
||||
{t.last.author && (
|
||||
<Avatar avatar={t.last.author.avatar} size={18} online={t.last.author.online} />
|
||||
)}
|
||||
{t.last.author?.nickname ?? "Törölt tag"},{" "}
|
||||
<time suppressHydrationWarning dateTime={t.last.at}>
|
||||
{ago(t.last.at)}
|
||||
</time>
|
||||
</span>
|
||||
)}
|
||||
{!t.readable && <span className="fh-topic-last">Belépés után olvasható</span>}
|
||||
</span>
|
||||
{t.readable && (
|
||||
<span className="fh-topic-count">
|
||||
<strong>{t.thread_count ?? 0}</strong> szál
|
||||
</span>
|
||||
)}
|
||||
{!t.readable && <span className="fh-topic-last">Belépés után olvasható</span>}
|
||||
</span>
|
||||
{t.readable && (
|
||||
<span className="fh-topic-count">
|
||||
<strong>{t.thread_count ?? 0}</strong> szál
|
||||
</span>
|
||||
)}
|
||||
{t.readable && t.new_count ? (
|
||||
<span className="ft-new">{t.new_count > 99 ? "99+" : t.new_count} új</span>
|
||||
) : null}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
{t.readable && t.new_count ? (
|
||||
<span className="ft-new">{t.new_count > 99 ? "99+" : t.new_count} új</span>
|
||||
) : null}
|
||||
</Link>
|
||||
</li>
|
||||
),
|
||||
)}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
@@ -212,6 +239,23 @@ export default async function ForumHomePage() {
|
||||
<SkyCard sky={sky} />
|
||||
</div>
|
||||
)}
|
||||
{home.data.online.length > 0 && (
|
||||
<section className="fh-card fh-online o-7" aria-labelledby="fh-online-title">
|
||||
<h2 id="fh-online-title" className="fh-online-title">
|
||||
Most itt vannak <span className="hint">({home.data.online.length})</span>
|
||||
</h2>
|
||||
<ul className="fh-online-list">
|
||||
{home.data.online.map((m) => (
|
||||
<li key={m.nickname}>
|
||||
<Link href={memberHref(m.nickname)} className="fh-online-item">
|
||||
<Avatar avatar={m.avatar} size={28} online />
|
||||
<span>{m.nickname}</span>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
)}
|
||||
{viewer.member && (
|
||||
<section className="fh-card fh-me o-7" aria-label="Saját">
|
||||
<div className="fh-me-head">
|
||||
@@ -220,7 +264,7 @@ export default async function ForumHomePage() {
|
||||
<Link href={memberHref(viewer.member.nickname)} className="fa-name">
|
||||
{viewer.member.nickname}
|
||||
</Link>
|
||||
<span className="fa-rank">{viewer.member.rank_name}</span>
|
||||
<RankBadge rank={viewer.member.rank} name={viewer.member.rank_name} />
|
||||
</span>
|
||||
</div>
|
||||
<div className="fh-me-actions">
|
||||
|
||||
Reference in New Issue
Block a user