Forum: the attached chart's wheel in the question
A question with a shared chart shows the chart's wheel, one with a shared synastry the two charts on one wheel, at a fixed size beside the details (above them on phones). The forum sends the wheel's data (positions, angles, houses, aspects; never birth date, time or place) to logged-in members only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { ChartWheel } from "@/components/ChartWheel";
|
||||
import { SynastryWheel } from "@/components/SynastryWheel";
|
||||
import { POINTS, SIGNS, signName } from "@/lib/astro";
|
||||
import type { ShareCardData } from "@/lib/forum";
|
||||
|
||||
@@ -36,44 +38,60 @@ export function ShareCard({ share, onRemove }: { share: ShareCardData; onRemove?
|
||||
);
|
||||
}
|
||||
const points = share.points ?? [];
|
||||
const drawing = share.chart ? (
|
||||
<ChartWheel chart={share.chart} timeKnown={share.time_known ?? false} title="A csatolt képlet" />
|
||||
) : share.pair ? (
|
||||
<SynastryWheel
|
||||
chart1={share.pair.chart1}
|
||||
chart2={share.pair.chart2}
|
||||
time1={share.pair.time1}
|
||||
time2={share.pair.time2}
|
||||
aspects={share.pair.aspects}
|
||||
name1="Első képlet"
|
||||
name2="Második képlet"
|
||||
/>
|
||||
) : null;
|
||||
return (
|
||||
<div className="fshare">
|
||||
<div className="fshare-head">
|
||||
<span className="eyebrow">{EYEBROW[share.kind]}</span>
|
||||
{onRemove && (
|
||||
<button type="button" className="fp-link" onClick={onRemove} aria-label="Képlet levétele">
|
||||
×
|
||||
</button>
|
||||
<div className={drawing ? "fshare fshare-drawn" : "fshare"}>
|
||||
{drawing && <div className="fshare-wheel">{drawing}</div>}
|
||||
<div className="fshare-info">
|
||||
<div className="fshare-head">
|
||||
<span className="eyebrow">{EYEBROW[share.kind]}</span>
|
||||
{onRemove && (
|
||||
<button type="button" className="fp-link" onClick={onRemove} aria-label="Képlet levétele">
|
||||
×
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<strong className="fshare-title">{share.title}</strong>
|
||||
{share.summary && <span className="fshare-summary">„{share.summary}”</span>}
|
||||
{points.length > 0 && (
|
||||
<ul className="fshare-points">
|
||||
{points.map((p) => (
|
||||
<li key={p.id}>
|
||||
<span className="sym" aria-hidden="true">
|
||||
{POINTS[p.id]?.glyph ?? ""}
|
||||
</span>{" "}
|
||||
{POINT_LABEL[p.id] ?? p.id}{" "}
|
||||
<span className="sym" aria-hidden="true">
|
||||
{SIGNS[p.sign]?.glyph ?? ""}
|
||||
</span>{" "}
|
||||
{signName(p.sign)}
|
||||
{p.degree !== null && ` ${p.degree}°`}
|
||||
{p.house !== null && <span className="hint"> · {p.house}. ház</span>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{share.kind !== "synastry" && share.time_known === false && (
|
||||
<span className="hint">A születési idő ismeretlen, ezért házak és Aszcendens nincsenek.</span>
|
||||
)}
|
||||
{share.slug && (
|
||||
<Link href={`/s/${share.slug}`} className="btn btn-sm fshare-open" target="_blank" rel="noopener">
|
||||
Megnyitom ›
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<strong className="fshare-title">{share.title}</strong>
|
||||
{share.summary && <span className="fshare-summary">„{share.summary}”</span>}
|
||||
{points.length > 0 && (
|
||||
<ul className="fshare-points">
|
||||
{points.map((p) => (
|
||||
<li key={p.id}>
|
||||
<span className="sym" aria-hidden="true">
|
||||
{POINTS[p.id]?.glyph ?? ""}
|
||||
</span>{" "}
|
||||
{POINT_LABEL[p.id] ?? p.id}{" "}
|
||||
<span className="sym" aria-hidden="true">
|
||||
{SIGNS[p.sign]?.glyph ?? ""}
|
||||
</span>{" "}
|
||||
{signName(p.sign)}
|
||||
{p.degree !== null && ` ${p.degree}°`}
|
||||
{p.house !== null && <span className="hint"> · {p.house}. ház</span>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{share.kind !== "synastry" && share.time_known === false && (
|
||||
<span className="hint">A születési idő ismeretlen, ezért házak és Aszcendens nincsenek.</span>
|
||||
)}
|
||||
{share.slug && (
|
||||
<Link href={`/s/${share.slug}`} className="btn btn-sm fshare-open" target="_blank" rel="noopener">
|
||||
Megnyitom ›
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user