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:
@@ -19,6 +19,10 @@ export interface ForumAuthor {
|
||||
online: boolean;
|
||||
/** Planet (or `ascendant`) → sign, as the member chose to share. */
|
||||
signs: Record<string, string> | null;
|
||||
/** A volunteer listener ("Meghallgató"). */
|
||||
listener?: boolean;
|
||||
/** Bought a package and shows the "Támogató" badge. */
|
||||
supporter?: boolean;
|
||||
}
|
||||
|
||||
export interface ForumViewer {
|
||||
@@ -39,6 +43,8 @@ export interface ForumTopic extends TopicRef {
|
||||
visibility: "public" | "members" | "restricted";
|
||||
listening: boolean;
|
||||
readable: boolean;
|
||||
/** A restricted topic: the viewer's place in it. */
|
||||
membership?: "none" | "pending" | "approved" | null;
|
||||
thread_count?: number;
|
||||
new_count?: number | null;
|
||||
last?: { author: ForumAuthor | null; at: string } | null;
|
||||
@@ -58,11 +64,15 @@ export interface ThreadCard {
|
||||
pinned: boolean;
|
||||
locked: boolean;
|
||||
unread: number | null;
|
||||
/** The site's own thread (the daily sky). */
|
||||
system?: boolean;
|
||||
}
|
||||
|
||||
export interface ForumHome {
|
||||
viewer: ForumViewer;
|
||||
followed: { new_replies: number; threads: number } | null;
|
||||
/** "Most itt vannak". */
|
||||
online: ForumAuthor[];
|
||||
topics: ForumTopic[];
|
||||
unanswered: ThreadCard[];
|
||||
hot: ThreadCard[];
|
||||
@@ -93,6 +103,12 @@ export interface ForumPost {
|
||||
mine: ReactionKind | "down" | null;
|
||||
/** Moderators only. */
|
||||
down?: number;
|
||||
/** The nicknames the post names ("@Holdfény"). */
|
||||
mentions?: string[];
|
||||
/** Written by the site itself (the daily sky). */
|
||||
system?: boolean;
|
||||
/** The post this reply answered (it may sit on the same level). */
|
||||
reply_to?: { id: number; nickname: string | null } | null;
|
||||
}
|
||||
|
||||
export interface ThreadPage {
|
||||
@@ -108,6 +124,7 @@ export interface ThreadPage {
|
||||
locked: boolean;
|
||||
pinned: boolean;
|
||||
deleted: { reason: string | null } | null;
|
||||
system?: boolean;
|
||||
};
|
||||
posts: ForumPost[];
|
||||
access?: {
|
||||
@@ -123,6 +140,9 @@ export interface EmailSettings {
|
||||
replies: "off" | "daily" | "instant";
|
||||
followed: "off" | "daily";
|
||||
messages: "off" | "instant";
|
||||
mentions: "off" | "instant";
|
||||
listener: "off" | "instant";
|
||||
weekly: boolean;
|
||||
}
|
||||
|
||||
export interface ForumMe {
|
||||
@@ -143,8 +163,14 @@ export interface ForumMe {
|
||||
banned_until: string | null;
|
||||
ban_reason: string | null;
|
||||
email: EmailSettings;
|
||||
listener: boolean;
|
||||
supporter_badge: boolean;
|
||||
can_listen: boolean;
|
||||
can_upload_avatar: boolean;
|
||||
} | null;
|
||||
chart: Record<Exclude<ChartShare, "none">, Record<string, string> | null> | null;
|
||||
/** Bought a package: may show the "Támogató" badge. */
|
||||
can_supporter: boolean;
|
||||
}
|
||||
|
||||
export interface MemberProfile {
|
||||
@@ -204,6 +230,11 @@ export function threadHref(t: { id: number; slug: string }, postId?: number): st
|
||||
return postId ? `${path}#h${postId}` : path;
|
||||
}
|
||||
|
||||
/** The address of an uploaded avatar (`upload:<file>`), or null for a starter one. */
|
||||
export function uploadedAvatar(avatar: string | null | undefined): string | null {
|
||||
return avatar?.startsWith("upload:") ? `/api/v1/forum/avatars/${encodeURIComponent(avatar.slice(7))}` : null;
|
||||
}
|
||||
|
||||
export function memberHref(nickname: string): string {
|
||||
return `/forum/tag/${encodeURIComponent(nickname)}`;
|
||||
}
|
||||
@@ -319,5 +350,16 @@ export interface ForumNavData {
|
||||
viewer: ForumViewer;
|
||||
followed: { new_replies: number } | null;
|
||||
messages: number | null;
|
||||
/** Moderators: open reports and requests to join restricted topics. */
|
||||
reports: number | null;
|
||||
/** Listeners: threads asking to be heard that wait for a reply. */
|
||||
waiting: number | null;
|
||||
}
|
||||
|
||||
export interface TopicRequest {
|
||||
topic: TopicRef;
|
||||
member: ForumAuthor | null;
|
||||
status: "pending" | "approved";
|
||||
note: string;
|
||||
requested_at: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user