Forum: asking about one's own chart, forecast or comparison

- "Kérdezek róla a fórumon" on the chart, yearly forecast and comparison
  pages: after a window that says what goes out, a share link made for the
  forum (never birth data, names or a title) and a new thread in "Égbolt és
  képletek" with it attached.
- The question shows a card (Sun, Moon, Ascendant with sign, degree and
  house, the summary's title, a link to the shared page) to logged-in
  members only; visitors and search engines see only that there is one.
  The author can take it off, and deleting the question ends the link.
- The shared page (/s/...) now shows comparisons (one wheel, the aspects,
  no names) and yearly forecasts (keys, timeline, transits, the detailed
  text; without the birthday's place); the backend shares forecasts.
- The privacy notice (HU, EN) covers attached charts and muted members.

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 14:52:00 +00:00
co-authored by Claude Opus 5.5
parent 9ca3f478be
commit 863002c1e7
24 changed files with 871 additions and 32 deletions
+15 -2
View File
@@ -161,11 +161,19 @@ export default async function PrivacyPage() {
<tr>
<td>
A fórumon írt szálaid és hozzászólásaid, a reakcióid és „Ez segített” jelöléseid, a pontjaid és a
rangod; kiket említettél (@álnév); hogy mit olvastál el, és mely szálakat követed
rangod; kiket említettél (@álnév); hogy mit olvastál el, mely szálakat követed, és kiket
némítottál el
</td>
<td>A fórum működése, a rangok, az újdonságok jelzése</td>
<td>Szerződés teljesítése</td>
</tr>
<tr>
<td>
A fórumkérdéseidhez csatolt képlet, éves előrejelzés vagy összevetés megosztó linkje
</td>
<td>Hogy a tagok lássák, amiről kérdezel; a csatolás a saját döntésed</td>
<td>Szerződés teljesítése</td>
</tr>
<tr>
<td>Zárt témákba küldött jelentkezéseid (a pár szavas indoklással) és a tagságaid</td>
<td>A zárt témák: a moderátorok döntenek a felvételről</td>
@@ -225,7 +233,12 @@ export default async function PrivacyPage() {
képletedből soha nem mutatunk fokokat. A privát üzeneteidet csak a beszélgetés két résztvevője látja; a
moderátorok csak akkor, ha valaki egy üzenetet jelent, és akkor is csak a jelentett üzenetet és az előtte
lévő néhányat. A moderátorok (az üzemeltető által kijelölt tagok) a valódi nevedet és az e-mail-címedet nem
látják. A fórum szabályai az <Link href="/aszf#forum">ÁSZF 8. pontjában</Link> vannak.
látják. Ha egy kérdésedhez csatolod a képletedet, az éves előrejelzésedet vagy egy összevetést, azt csak a
belépett tagok látják: a rajzot fokokkal és házakkal, a rövid összefoglalót vagy az előrejelzés szövegét,
nevek, születési dátum, idő és hely nélkül. A fokokból egy jártas asztrológus nagyjából kiszámolhatja a
születési napot és időt, az előrejelzés kezdőnapjából pedig a születésnap kiderül. A csatolt képletet
bármikor leveheted, és a kérdés törlésével a link is megszűnik. A fórum szabályai az{" "}
<Link href="/aszf#forum">ÁSZF 8. pontjában</Link> vannak.
</p>
</section>
@@ -61,7 +61,9 @@ async function forward(req: NextRequest, ctx: { params: Promise<{ path: string[]
});
for (const cookie of res.headers.getSetCookie()) out.append("set-cookie", cookie);
// A revoked link must disappear at once from the cached share pages.
if (req.method === "DELETE" && path[0] === "shares" && res.ok) revalidateTag(SHARES_TAG, { expire: 0 });
// A revoked link (also a chart taken off a forum question, or the question deleted) goes from the cache.
const revokes = path[0] === "shares" || (path[0] === "forum" && path[1] === "posts");
if (req.method === "DELETE" && revokes && res.ok) revalidateTag(SHARES_TAG, { expire: 0 });
// An admin's change to a famous person shows on the public pages at once.
if (req.method !== "GET" && path[0] === "admin" && path[1] === "celebrities" && res.ok) {
revalidateTag(CELEBRITIES_TAG, { expire: 0 });
+14
View File
@@ -687,3 +687,17 @@ a.fh-online-item:hover { color: var(--gold); }
.fh-archived summary { min-height: 44px; display: flex; align-items: center; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.fh-archived .fh-links { list-style: none; margin: 0; padding: 0; }
.fh-archived li + li .fh-link { border-top: 1px solid var(--line); }
/* --- a chart shared with a question --- */
.fshare {
display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 12px; padding: 14px 16px;
border: 1px solid var(--line-2); border-radius: 14px; background: var(--f-tint);
}
.fshare-quiet { background: none; border-style: dashed; }
.fshare-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.fshare-title { font-size: 16px; }
.fshare-summary { font-family: var(--font-display); font-size: 19px; color: var(--ink-2); }
.fshare-points { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.fshare-open { margin-top: 4px; }
.fnew-share { display: flex; flex-direction: column; gap: 8px; }
.fnew-share .fshare { margin-top: 0; }
@@ -6,12 +6,23 @@ import { useState } from "react";
import { api, errorText } from "@/lib/api";
import { convertEmoticons, withEmoji } from "@/lib/emoticons";
import { type ForumTopic, threadHref } from "@/lib/forum";
import { ShareCard } from "@/components/forum/ShareCard";
import { type ForumTopic, type ShareCardData, threadHref } from "@/lib/forum";
type Intent = "listen" | "advice" | "";
export function NewThreadForm({ topics, initialTopic }: { topics: ForumTopic[]; initialTopic: string }) {
export function NewThreadForm({
topics,
initialTopic,
share: initialShare,
}: {
topics: ForumTopic[];
initialTopic: string;
/** A chart, forecast or synastry shared for the question (from its page). */
share?: { slug: string; card: ShareCardData } | null;
}) {
const router = useRouter();
const [share, setShare] = useState(initialShare ?? null);
const [topic, setTopic] = useState(initialTopic);
const listening = topics.find((t) => t.slug === topic)?.listening ?? false;
const [intent, setIntent] = useState<Intent>(listening ? "listen" : "");
@@ -37,6 +48,7 @@ export function NewThreadForm({ topics, initialTopic }: { topics: ForumTopic[];
title: convertEmoticons(title, title.length, true).text,
body: convertEmoticons(body, body.length, true).text,
intent: intent || null,
share: share?.slug ?? null,
},
});
router.push(threadHref(created));
@@ -49,6 +61,15 @@ export function NewThreadForm({ topics, initialTopic }: { topics: ForumTopic[];
return (
<form className="fnew" onSubmit={submit}>
{share && (
<div className="fnew-share">
<ShareCard share={share.card} onRemove={() => setShare(null)} />
<span className="hint">
A belépett tagok látják a hozzászólásod alatt. Írd le, mire vagy kíváncsi: minél konkrétabb a kérdés, annál
jobb válaszokat kapsz.
</span>
</div>
)}
<fieldset className="fnew-set">
<legend>Téma</legend>
<div className="fnew-topics">
+16 -5
View File
@@ -1,18 +1,21 @@
import { redirect } from "next/navigation";
import type { ForumTopic, ForumViewer } from "@/lib/forum";
import type { ForumTopic, ForumViewer, ShareCardData } from "@/lib/forum";
import { forumGet } from "@/lib/forumServer";
import { NewThreadForm } from "./NewThreadForm";
export const metadata = { title: "Új szál", robots: { index: false } };
type Props = { searchParams: Promise<{ tema?: string }> };
type Props = { searchParams: Promise<{ tema?: string; kepletkartya?: string }> };
/** Starting a thread: a nickname first, then topic, wish, title and text. */
export default async function NewThreadPage({ searchParams }: Props) {
const { tema } = await searchParams;
const back = `/forum/uj${tema ? `?tema=${encodeURIComponent(tema)}` : ""}`;
const { tema, kepletkartya } = await searchParams;
const query = new URLSearchParams();
if (tema) query.set("tema", tema);
if (kepletkartya) query.set("kepletkartya", kepletkartya);
const back = `/forum/uj${query.size ? `?${query}` : ""}`;
const res = await forumGet<{ topics: ForumTopic[] }>("/v1/forum/topics");
const nav = await forumGet<{ viewer: ForumViewer }>("/v1/forum/nav");
const viewer = nav.ok ? nav.data.viewer : null;
@@ -20,13 +23,21 @@ export default async function NewThreadPage({ searchParams }: Props) {
if (viewer.needs_nickname) redirect(`/forum/beallitasok?vissza=${encodeURIComponent(back)}`);
const topics = res.ok ? res.data.topics.filter((t) => t.readable && !t.archived) : [];
const initial = topics.find((t) => t.slug === tema)?.slug ?? topics[0]?.slug ?? "";
// A question about one's chart: the share made for it on the chart page.
const card = kepletkartya
? await forumGet<ShareCardData>(`/v1/forum/share-card/${encodeURIComponent(kepletkartya)}`).catch(() => null)
: null;
return (
<div className="fh">
<h1 className="fpage-title">Új szál</h1>
{viewer.member?.banned ? (
<p className="fh-banner fh-banner-warn">Most nem írhatsz a fórumba.</p>
) : (
<NewThreadForm topics={topics} initialTopic={initial} />
<NewThreadForm
topics={topics}
initialTopic={initial}
share={card?.ok && kepletkartya ? { slug: kepletkartya, card: card.data } : null}
/>
)}
</div>
);
+7
View File
@@ -1796,3 +1796,10 @@ span.tarot-fan-card { cursor: default; }
.lp-gift-text { align-items: center; }
.lp-gift-card { width: 160px; }
}
/* "Kérdezek róla a fórumon" (chart, forecast and comparison pages). */
.ask-forum { display: inline-flex; align-items: center; gap: 8px; }
.ask-forum svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask-forum-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ask-forum-body { display: flex; flex-direction: column; gap: 12px; }
.ask-forum-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
@@ -2,11 +2,13 @@ import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { AskOnForum } from "@/components/AskOnForum";
import { ChartWheel } from "@/components/ChartWheel";
import { DetailedAnalysis } from "@/components/DetailedAnalysis";
import { ForecastKeys, ForecastTimeline, ForecastTransits, longDay } from "@/components/ForecastViews";
import { Tabs } from "@/components/Tabs";
import { payMethod } from "@/lib/payments";
import { forumEnabled } from "@/lib/forumServer";
import { backendGet, requireMe } from "@/lib/server";
import type { Analysis, Chart, ForecastDetail, ForecastList, PublicConfig } from "@/lib/types";
@@ -94,6 +96,12 @@ export default async function ForecastPage({
)}
<div className="field chart-side">
<ForecastKeys forecast={fc} solarReturn={sr} />
{forumEnabled() && (
<div className="card ask-forum-card">
<p className="muted">Kérdésed van az évedről? Kérdezd meg a fórum tagjait.</p>
<AskOnForum kind="forecast" targetId={forecast.id} />
</div>
)}
{(list.years.length > 0 || others.length > 0) && (
<details className="card">
<summary>Másik év vagy helyszín</summary>
@@ -3,6 +3,7 @@ import Link from "next/link";
import { notFound } from "next/navigation";
import { AspectGrid, AspectList, BigThree, PositionTables } from "@/components/ChartTables";
import { AskOnForum } from "@/components/AskOnForum";
import { ChartSummary } from "@/components/ChartSummary";
import { ChartSwitcher } from "@/components/ChartSwitcher";
import { DetailedAnalysis } from "@/components/DetailedAnalysis";
@@ -12,6 +13,7 @@ import { SkyToday } from "@/components/SkyToday";
import { Tabs } from "@/components/Tabs";
import { ASPECTS, ELEMENTS, MODALITIES, MOON_PHASES, countryName, formatBirthDate, pointName } from "@/lib/astro";
import { payMethod } from "@/lib/payments";
import { forumEnabled } from "@/lib/forumServer";
import { backendGet, requireMe } from "@/lib/server";
import { loadSky } from "@/lib/sky";
import type { Analysis, Chart, ChartListItem, PublicConfig } from "@/lib/types";
@@ -86,6 +88,12 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
referralsLeft={me.referral_rewards.limit - me.referral_rewards.earned}
/>
<BigThree chart={chart} />
{forumEnabled() && (
<div className="card ask-forum-card">
<p className="muted">Kérdésed van a képletről? Kérdezd meg a fórum tagjait.</p>
<AskOnForum kind="chart" targetId={chart.id} />
</div>
)}
</div>
</section>
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { AskOnForum } from "@/components/AskOnForum";
import { SignTrio } from "@/components/ChartCard";
import { DetailedAnalysis } from "@/components/DetailedAnalysis";
import { CompositeTables, CrossGrid, HouseOverlays, InterAspectList, NatureBar } from "@/components/SynastryTables";
@@ -9,6 +10,7 @@ import { SynastryLegend, SynastryWheel } from "@/components/SynastryWheel";
import { Tabs } from "@/components/Tabs";
import { ASPECTS, formatBirthDate } from "@/lib/astro";
import { payMethod } from "@/lib/payments";
import { forumEnabled } from "@/lib/forumServer";
import { backendGet, requireMe } from "@/lib/server";
import { sideName, sideTimeKnown } from "@/lib/synastry";
import type { Analysis, ChartListItem, PublicConfig, Synastry, SynastrySide } from "@/lib/types";
@@ -112,6 +114,12 @@ export default async function ComparisonPage({ params }: { params: Promise<{ id:
</p>
)}
</div>
{forumEnabled() && (
<div className="card ask-forum-card">
<p className="muted">Kérdésed van kettőtök képletéről? Kérdezd meg a fórum tagjait.</p>
<AskOnForum kind="synastry" targetId={synastry.id} />
</div>
)}
</div>
</section>
+11 -2
View File
@@ -90,10 +90,15 @@ const DATA: [string, string, string][] = [
"Performance of the contract",
],
[
"Your forum threads and posts, your reactions and “Ez segített” (it helped) marks, your points and rank; whom you mentioned (@nickname); what you have read, and the threads you follow",
"Your forum threads and posts, your reactions and “Ez segített” (it helped) marks, your points and rank; whom you mentioned (@nickname); what you have read, the threads you follow, and the members you muted",
"Running the forum, the ranks, showing what is new",
"Performance of the contract",
],
[
"The share link of a chart, yearly forecast or comparison you attach to a forum question",
"So that members see what you are asking about; attaching it is your choice",
"Performance of the contract",
],
[
"Your requests to join restricted topics (with the few words you add) and your memberships",
"Restricted topics: the moderators decide who joins",
@@ -194,7 +199,11 @@ export default async function PrivacyPolicyPage() {
you switched on (Kísérő – companion, Támogató – supporter); never your real name, e-mail address or birth data, and never the
degrees of your chart. Your private messages are seen only by the two people in the conversation; moderators
see a message only when someone reports it, and then only that message and the few before it. Moderators
(members appointed by the operator) do not see your real name or e-mail address. The forum rules are in
(members appointed by the operator) do not see your real name or e-mail address. If you attach your chart,
yearly forecast or a comparison to a question, only logged-in members see it: the drawing with degrees and
houses, the short summary or the forecast text, without names, birth date, time or place. A practised
astrologer can roughly work out the birth date and time from the degrees, and a forecast's first day is the
birthday. You can take it off at any time, and deleting the question ends the link. The forum rules are in
point 8 of the <Link href="/aszf#forum">terms (ÁSZF, in Hungarian)</Link>.
</p>
</section>
+125 -1
View File
@@ -2,13 +2,18 @@ import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { AnalysisView } from "@/components/AnalysisView";
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
import { ForecastKeys, ForecastTimeline, ForecastTransits, longDay } from "@/components/ForecastViews";
import { InterAspectList, NatureBar } from "@/components/SynastryTables";
import { SynastryLegend, SynastryWheel } from "@/components/SynastryWheel";
import { Rich } from "@/components/Rich";
import { ShareVisit } from "@/components/ShareVisit";
import { PublicHeader } from "@/components/SiteHeader";
import { SIGNS, signName } from "@/lib/astro";
import { getMe } from "@/lib/server";
import { bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share";
import { type PublicShare, bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share";
import type { Synastry } from "@/lib/types";
type Props = { params: Promise<{ slug: string }> };
@@ -16,6 +21,13 @@ type Props = { params: Promise<{ slug: string }> };
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params;
const share = await loadShare(slug);
if (share?.kind === "synastry" && share.synastry) {
return { title: "Megosztott összevetés", robots: { index: false, follow: false } };
}
if (share?.kind === "forecast" && share.forecast) {
const y = share.forecast.year;
return { title: `Megosztott éves előrejelzés · ${y}–${y + 1}`, robots: { index: false, follow: false } };
}
if (!share?.chart) return { title: "A link nem érhető el", robots: { index: false } };
const base = await siteUrl();
const title = share.summary?.title ?? "Születési képlet";
@@ -39,6 +51,12 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
export default async function SharedChartPage({ params }: Props) {
const { slug } = await params;
const [share, me] = await Promise.all([loadShare(slug), getMe()]);
if (share?.kind === "synastry" && share.synastry) {
return <SharedSynastry slug={slug} share={share} loggedIn={me !== null} />;
}
if (share?.kind === "forecast" && share.forecast) {
return <SharedForecast slug={slug} share={share} loggedIn={me !== null} />;
}
const chart = share?.chart?.chart;
if (!share || !chart) notFound();
const summary = share.summary;
@@ -106,3 +124,109 @@ export default async function SharedChartPage({ params }: Props) {
</>
);
}
/** A shared comparison: the two charts on one wheel and the aspects between them, without names. */
function SharedSynastry({ slug, share, loggedIn }: { slug: string; share: PublicShare; loggedIn: boolean }) {
const s = share.synastry!;
const name1 = s.chart1.label ?? "Első képlet";
const name2 = s.chart2.label ?? "Második képlet";
const time1 = s.chart1.chart.time_known;
const time2 = s.chart2.chart.time_known;
// The tables read only the result.
const synastry = { synastry: s.synastry } as unknown as Synastry;
return (
<>
<ShareVisit slug={slug} />
{!loggedIn && <PublicHeader />}
<main className="page" style={{ maxWidth: 1180 }}>
<div className="page-head">
<span className="eyebrow">Megosztott összevetés</span>
<h1>Két képlet egymásra vetítve</h1>
</div>
<section className="chart-layout" aria-label="Kettős képletrajz">
<div className="card chart-wheel-card">
<SynastryWheel
chart1={s.chart1.chart}
chart2={s.chart2.chart}
time1={time1}
time2={time2}
aspects={s.synastry.aspects}
name1={name1}
name2={name2}
/>
<SynastryLegend name1={name1} name2={name2} time1={time1} />
</div>
<div className="field chart-side">
<div className="card summary-card">
<span className="eyebrow">Számokban</span>
<h2 className="summary-title">{s.synastry.summary.aspect_count} fényszög a két képlet között</h2>
<NatureBar summary={s.synastry.summary} />
</div>
</div>
</section>
<section className="card" aria-label="Fényszögek">
<h2>Fényszögek</h2>
<InterAspectList synastry={synastry} name1={name1} name2={name2} />
</section>
<p className="hint">Ezt az összevetést a tulajdonosa osztotta meg, nevek és születési adatok nélkül.</p>
</main>
</>
);
}
/** A shared yearly forecast: the year's keys, timeline and transits, and the detailed text if it was written. */
function SharedForecast({ slug, share, loggedIn }: { slug: string; share: PublicShare; loggedIn: boolean }) {
const f = share.forecast!;
const fc = f.forecast;
const sr = f.solar_return;
const text = share.analysis?.content ?? null;
return (
<>
<ShareVisit slug={slug} />
{!loggedIn && <PublicHeader />}
<main className="page" style={{ maxWidth: 1180 }}>
<div className="page-head">
<span className="eyebrow">Megosztott éves előrejelzés</span>
<h1>
{f.year}–{f.year + 1}
</h1>
<p className="muted">
{longDay(fc.start)} – {longDay(fc.end)}
</p>
</div>
<section className="chart-layout" aria-label="Szolár képlet">
{sr ? (
<div className="card chart-wheel-card">
<ChartWheel chart={sr} timeKnown title="Szolár képlet" />
<p className="hint">Szolár képlet: a Nap ekkor ér vissza pontosan a születéskori helyére.</p>
</div>
) : (
<div className="card">
<p className="muted">Szolár képlet nincs, mert a születési idő ismeretlen.</p>
</div>
)}
<div className="field chart-side">
<ForecastKeys forecast={fc} solarReturn={sr} />
</div>
</section>
{text && (
<section className="card" aria-label="Előrejelzés">
<AnalysisView content={text} kind="forecast" language={share.analysis?.language} />
</section>
)}
<section className="card" aria-label="Idővonal">
<h2>Idővonal</h2>
<ForecastTimeline forecast={fc} />
</section>
<section className="card" aria-label="Tranzitok">
<h2>Tranzitok</h2>
<ForecastTransits forecast={fc} />
</section>
<p className="hint">
Ezt az előrejelzést a tulajdonosa osztotta meg, név, születési adatok és helyszín nélkül.
{text && " A szöveget mesterséges intelligencia írta a képlet alapján."}
</p>
</main>
</>
);
}