From afa113cecad0cd73b764c530ba32eb2896859b22 Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 10:32:10 +0000 Subject: [PATCH 1/8] Chart page tabs (analysis, planets, matrix, details); square aspect matrix Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/globals.css | 29 ++++- .../frontend/src/app/kepletek/[id]/page.tsx | 58 +++++++-- .../frontend/src/components/ChartTables.tsx | 123 +++++++++--------- .../src/components/DetailedAnalysis.tsx | 6 +- services/frontend/src/components/Tabs.tsx | 73 +++++++++++ 5 files changed, 203 insertions(+), 86 deletions(-) create mode 100644 services/frontend/src/components/Tabs.tsx diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 47c944a..5d75a24 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -239,8 +239,11 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } } .aspect-grid th { color: var(--ink); font-weight: 400; font-size: 17px; background: var(--panel-2); } .aspect-grid .grid-angle { font: 600 11px var(--font-body); color: var(--gold); letter-spacing: 0.3px; } -.aspect-grid td.void, .aspect-grid td.corner { border: 0; background: none; } -.aspect-grid tbody td:not(.void):hover { background: var(--panel-2); } +.aspect-grid td.corner { border: 0; background: none; } +.aspect-grid td.diag { background: var(--line); } +.aspect-grid tbody td:not(.diag):hover { background: var(--panel-2); } +.grid-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); } +.grid-legend .sym { font-size: 17px; } .asp-conjunction { color: var(--gold); } .asp-trine, .asp-sextile { color: var(--harmonic); } .asp-square { color: var(--square); } @@ -248,10 +251,11 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .details > summary { cursor: pointer; color: var(--gold); min-height: 44px; display: flex; align-items: center; } .details[open] > summary { margin-bottom: 8px; } @media (max-width: 640px) { - .aspect-grid { font-size: 13px; } - .aspect-grid td, .aspect-grid th { width: 23px; min-width: 23px; height: 23px; } - .aspect-grid th { font-size: 14px; } - .aspect-grid .grid-angle { font-size: 9px; } + .aspect-grid { font-size: 12px; } + .aspect-grid td, .aspect-grid th { width: 19px; min-width: 19px; height: 19px; } + .aspect-grid th { font-size: 13px; } + .aspect-grid .grid-angle { font-size: 8px; letter-spacing: 0; } + .chart-tabs { padding: 4px 12px 16px; } } .aspect-harmonic { color: var(--harmonic); } .aspect-tense { color: var(--tense); } @@ -302,3 +306,16 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } + +/* Tabs */ +.chart-tabs { padding-top: 8px; } +.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } +.tab { + background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 16px; min-height: 44px; + color: var(--muted); font: 500 15px var(--font-body); cursor: pointer; white-space: nowrap; +} +.tab:hover { color: var(--ink); } +.tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); } +.tab:focus-visible, .tab-panel:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; } +.tab-panel { padding-top: 20px; } +@media (max-width: 640px) { .tab { padding: 12px 10px; font-size: 14px; } } diff --git a/services/frontend/src/app/kepletek/[id]/page.tsx b/services/frontend/src/app/kepletek/[id]/page.tsx index 4db55ba..da8a1cb 100644 --- a/services/frontend/src/app/kepletek/[id]/page.tsx +++ b/services/frontend/src/app/kepletek/[id]/page.tsx @@ -1,16 +1,19 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; -import { BigThree, ChartTables } from "@/components/ChartTables"; +import { AspectGrid, AspectList, BigThree, PositionTables } from "@/components/ChartTables"; import { ChartSummary } from "@/components/ChartSummary"; import { DetailedAnalysis } from "@/components/DetailedAnalysis"; import { ChartWheel, WheelLegend } from "@/components/ChartWheel"; -import { ELEMENTS, MODALITIES, MOON_PHASES, countryName, formatBirthDate, pointName } from "@/lib/astro"; +import { Tabs } from "@/components/Tabs"; +import { ASPECTS, ELEMENTS, MODALITIES, MOON_PHASES, countryName, formatBirthDate, pointName } from "@/lib/astro"; import { backendGet, requireMe } from "@/lib/server"; import type { Analysis, Chart, PublicConfig } from "@/lib/types"; export const metadata: Metadata = { title: "Képlet" }; +const GRID_LEGEND = ["conjunction", "sextile", "square", "trine", "opposition"]; + const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; /** One saved chart: the wheel and the tables, read from the database (not recalculated). */ @@ -105,17 +108,46 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri - - -
-

Pozíciók

- +
+ + ), + }, + { id: "bolygok", label: "Bolygók", content: }, + { + id: "matrix", + label: "Mátrix", + content: ( +
+ +
    + {GRID_LEGEND.map((k) => ( +
  • + {" "} + {ASPECTS[k]?.hu} +
  • + ))} +
+
+ ), + }, + { id: "reszletek", label: "Részletek", content: }, + ]} + />
); diff --git a/services/frontend/src/components/ChartTables.tsx b/services/frontend/src/components/ChartTables.tsx index 3a2c194..ca378d6 100644 --- a/services/frontend/src/components/ChartTables.tsx +++ b/services/frontend/src/components/ChartTables.tsx @@ -67,8 +67,8 @@ const GRID_ANGLES: [string, string][] = [ ["midheaven", "MC"], ]; -/** The usual triangular aspect grid: only the aspect symbols, the values are in the details below. */ -function AspectGrid({ chart }: { chart: Chart }) { +/** The aspect grid: a square matrix with the points on both sides, only the aspect symbols in it. */ +export function AspectGrid({ chart }: { chart: Chart }) { const result = chart.chart; const present = new Set(result.points.map((p) => p.id)); const rows: [string, string][] = GRID_POINTS.filter((id) => present.has(id)).map((id) => [ @@ -83,14 +83,11 @@ function AspectGrid({ chart }: { chart: Chart }) { byPair.set(`${a.point1}|${a.point2}`, a); byPair.set(`${a.point2}|${a.point1}`, a); } - const label = ([id, text]: [string, string]) => ( 2 ? "sym" : "grid-angle"} aria-label={pointName(id)} role="img"> {text} ); - // Lower triangle with both headers: rows from the 2nd point, columns up to the last but one. - const cols = rows.slice(0, -1); return (
@@ -98,7 +95,7 @@ function AspectGrid({ chart }: { chart: Chart }) { - {cols.map((c) => ( + {rows.map((c) => ( {label(c)} @@ -106,18 +103,18 @@ function AspectGrid({ chart }: { chart: Chart }) { - {rows.slice(1).map((row, r) => { + {rows.map((row) => { const [id] = row; return ( {label(row)} - {cols.map(([other], j) => { - if (j > r) return ; + {rows.map(([other]) => { + if (other === id) return ; const a = byPair.get(`${id}|${other}`); const info = a ? ASPECTS[a.aspect] : undefined; - const text = a ? `${pointName(other)} ${info?.hu ?? a.aspect} ${pointName(id)}` : undefined; + const text = a ? `${pointName(id)} ${info?.hu ?? a.aspect} ${pointName(other)}` : undefined; return ( {a && ( @@ -137,15 +134,14 @@ function AspectGrid({ chart }: { chart: Chart }) { ); } -/** Positions, angles, house cusps and aspects of a natal chart. */ -export function ChartTables({ chart }: { chart: Chart }) { +/** Positions, angles and house cusps of a natal chart. */ +export function PositionTables({ chart }: { chart: Chart }) { const result = chart.chart; const timeKnown = chart.highlights.time_known; const angles = ANGLES.map(([key, label]) => [label, result.angles?.[key]] as const).filter( (a): a is readonly [string, Position] => typeof a[1] === "object" && a[1] !== null, ); const fortune = result.lots?.fortune; - const aspects = [...(result.aspects ?? [])].sort((a, b) => a.orb - b.orb); return (
@@ -230,57 +226,6 @@ export function ChartTables({ chart }: { chart: Chart }) {
)}
- {aspects.length > 0 && ( -
-

Fényszögek

- -
- Részletek: orbisz, közeledő vagy távolodó -
- - - - - - - - - - {aspects.map((a) => { - const info = ASPECTS[a.aspect]; - return ( - - - - - - ); - })} - -
FényszögOrbisz - Közeledő vagy távolodó -
- {" "} - {pointName(a.point1)}{" "} - - {" "} - {info?.hu ?? a.aspect} - {" "} - {" "} - {pointName(a.point2)} - {orbText(a.orb)} - {a.applying === true ? "közeledő" : a.applying === false ? "távolodó" : ""} -
-
-
-
- )} {!timeKnown && (

Születési idő nélkül a házak, a tengelyek és az Aszcendens nem számolhatók; a Hold helyzete a nap folyamán akár @@ -290,3 +235,53 @@ export function ChartTables({ chart }: { chart: Chart }) { ); } + +/** Every aspect with its orb and whether it is applying, closest first. */ +export function AspectList({ chart }: { chart: Chart }) { + const aspects = [...(chart.chart.aspects ?? [])].sort((a, b) => a.orb - b.orb); + if (aspects.length === 0) return

Nincs fényszög.

; + return ( +
+ + + + + + + + + + {aspects.map((a) => { + const info = ASPECTS[a.aspect]; + return ( + + + + + + ); + })} + +
FényszögOrbisz + Közeledő vagy távolodó +
+ {" "} + {pointName(a.point1)}{" "} + + {" "} + {info?.hu ?? a.aspect} + {" "} + {" "} + {pointName(a.point2)} + {orbText(a.orb)} + {a.applying === true ? "közeledő" : a.applying === false ? "távolodó" : ""} +
+
+ ); +} diff --git a/services/frontend/src/components/DetailedAnalysis.tsx b/services/frontend/src/components/DetailedAnalysis.tsx index 5d9f949..3e454fb 100644 --- a/services/frontend/src/components/DetailedAnalysis.tsx +++ b/services/frontend/src/components/DetailedAnalysis.tsx @@ -78,7 +78,7 @@ export function DetailedAnalysis({ if (analysis?.status === "done" && analysis.content) { return ( -
+
Részletes elemzés
@@ -87,7 +87,7 @@ export function DetailedAnalysis({ if (waiting) { return ( -
+
Részletes elemzés +
Részletes elemzés

Az egész képleted, fejezetekre bontva

diff --git a/services/frontend/src/components/Tabs.tsx b/services/frontend/src/components/Tabs.tsx new file mode 100644 index 0000000..f8976f5 --- /dev/null +++ b/services/frontend/src/components/Tabs.tsx @@ -0,0 +1,73 @@ +"use client"; + +import { type KeyboardEvent, type ReactNode, useEffect, useRef, useState } from "react"; + +export type Tab = { id: string; label: string; content: ReactNode }; + +/** + * Tabs with the chosen one kept in the URL hash (#matrix), so a reload or a + * shared link opens the same tab. Hidden panels stay mounted: a running + * analysis keeps polling while another tab is open. + */ +export function Tabs({ tabs, label }: { tabs: Tab[]; label: string }) { + const [active, setActive] = useState(tabs[0]?.id); + const buttons = useRef<(HTMLButtonElement | null)[]>([]); + + useEffect(() => { + const fromHash = window.location.hash.slice(1); + if (tabs.some((t) => t.id === fromHash)) setActive(fromHash); + }, [tabs]); + + function choose(id: string) { + setActive(id); + history.replaceState(null, "", `#${id}`); + } + + function onKey(e: KeyboardEvent, i: number) { + const step = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0; + const to = e.key === "Home" ? 0 : e.key === "End" ? tabs.length - 1 : step ? (i + step + tabs.length) % tabs.length : -1; + if (to < 0) return; + e.preventDefault(); + choose(tabs[to].id); + buttons.current[to]?.focus(); + } + + return ( +

+
+ {tabs.map((t, i) => ( + + ))} +
+ {tabs.map((t) => ( + + ))} +
+ ); +} -- 2.54.0 From 1e954596710d815591f84f843be0852a31237a05 Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 10:37:37 +0000 Subject: [PATCH 2/8] Roomier detailed analysis offer (flex gaps were lost when it moved into a tab) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/globals.css | 9 +++++++-- services/frontend/src/components/DetailedAnalysis.tsx | 8 +++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 5d75a24..30a3467 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -167,7 +167,12 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .gsi-overlay > div, .gsi-overlay iframe { transform: scale(1.06, 1.2); } /* Detailed analysis */ -.analysis-card { gap: 14px; } +.analysis-card { display: flex; flex-direction: column; gap: 16px; } +.analysis-offer { padding: 8px 0 4px; } +.analysis-offer .offer-head { display: flex; flex-direction: column; gap: 8px; } +.analysis-offer p.muted { max-width: 64ch; line-height: 1.7; } +.analysis-offer .form-actions, .analysis-offer .pay-box { margin-top: 12px; } +.analysis-offer .form-actions { gap: 12px 16px; } .analysis { display: flex; flex-direction: column; gap: 28px; } .analysis-head { display: flex; flex-direction: column; gap: 12px; } .analysis-head h2 { font-size: 34px; } @@ -205,7 +210,7 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } @media (max-width: 640px) { .loading { flex-direction: column; text-align: center; } } /* Payment step */ -.pay-box { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); } +.pay-box { display: flex; flex-direction: column; gap: 16px; padding: 20px; max-width: 520px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); } .pay-line { display: flex; justify-content: space-between; gap: 12px; } .chart-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 24px; align-items: stretch; } .chart-side { gap: 16px; } diff --git a/services/frontend/src/components/DetailedAnalysis.tsx b/services/frontend/src/components/DetailedAnalysis.tsx index 3e454fb..86313f7 100644 --- a/services/frontend/src/components/DetailedAnalysis.tsx +++ b/services/frontend/src/components/DetailedAnalysis.tsx @@ -98,9 +98,11 @@ export function DetailedAnalysis({ } return ( -
- Részletes elemzés -

Az egész képleted, fejezetekre bontva

+
+
+ Részletes elemzés +

Az egész képleted, fejezetekre bontva

+

Kb. 1500 szó hat fejezetben: személyiség, érzelmek, gondolkodás, szerelem és kapcsolatok, hivatás, fejlődési út. A végén erősségek, kihívások és útravaló. Csak a képleted pozíciói alapján készül. -- 2.54.0 From 0e01f88f315ebf464b155e68d41cf6b6ceae4df5 Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 10:43:03 +0000 Subject: [PATCH 3/8] Summary card links to the detailed analysis tab Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/globals.css | 6 +++++ .../frontend/src/app/kepletek/[id]/page.tsx | 2 +- .../frontend/src/components/ChartSummary.tsx | 23 ++++++++++++++++++- services/frontend/src/components/Tabs.tsx | 22 +++++++++++++++--- 4 files changed, 48 insertions(+), 5 deletions(-) diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 30a3467..56e5420 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -191,6 +191,11 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); } .summary-title { font-size: 26px; } .summary-text { font-size: 16px; line-height: 1.65; color: var(--ink-2); } +.summary-more { + margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; + color: var(--gold); font-weight: 500; text-decoration: none; +} +.summary-more:hover { text-decoration: underline; text-underline-offset: 3px; } .summary-text strong { color: var(--ink); font-weight: 600; } .skeleton { display: flex; flex-direction: column; gap: 8px; } .skeleton span { height: 12px; border-radius: 6px; background: var(--line); animation: pulse 1.4s ease-in-out infinite; } @@ -322,5 +327,6 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .tab:hover { color: var(--ink); } .tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); } .tab:focus-visible, .tab-panel:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; } +.tabs { scroll-margin-top: 16px; } .tab-panel { padding-top: 20px; } @media (max-width: 640px) { .tab { padding: 12px 10px; font-size: 14px; } } diff --git a/services/frontend/src/app/kepletek/[id]/page.tsx b/services/frontend/src/app/kepletek/[id]/page.tsx index da8a1cb..405d890 100644 --- a/services/frontend/src/app/kepletek/[id]/page.tsx +++ b/services/frontend/src/app/kepletek/[id]/page.tsx @@ -59,7 +59,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri

- + {(elements || modalities || phase) && (
diff --git a/services/frontend/src/components/ChartSummary.tsx b/services/frontend/src/components/ChartSummary.tsx index b971365..5f82d79 100644 --- a/services/frontend/src/components/ChartSummary.tsx +++ b/services/frontend/src/components/ChartSummary.tsx @@ -7,6 +7,7 @@ import type { Analysis } from "@/lib/types"; import { AnalysisLoading } from "./AnalysisLoading"; import { Rich } from "./Rich"; +import { openTab } from "./Tabs"; const POLL_MS = 3000; const MAX_POLLS = 60; @@ -16,7 +17,16 @@ const MAX_POLLS = 60; * saved; this asks for it (queueing it again if it failed) and polls until the * worker has written it. */ -export function ChartSummary({ chartId, initial }: { chartId: string; initial: Analysis | null }) { +export function ChartSummary({ + chartId, + initial, + detailedDone = false, +}: { + chartId: string; + initial: Analysis | null; + /** The detailed analysis is ready: the link says so instead of offering it. */ + detailedDone?: boolean; +}) { const [summary, setSummary] = useState(initial); const [gaveUp, setGaveUp] = useState(false); const done = summary?.status === "done"; @@ -57,6 +67,17 @@ export function ChartSummary({ chartId, initial }: { chartId: string; initial: A

+ { + e.preventDefault(); + openTab("elemzes"); + }} + > + {detailedDone ? "Elolvasom a részletes elemzést" : "Kérj részletes elemzést: hat fejezet a képletedről"} + + ) : ( <> diff --git a/services/frontend/src/components/Tabs.tsx b/services/frontend/src/components/Tabs.tsx index f8976f5..97a324d 100644 --- a/services/frontend/src/components/Tabs.tsx +++ b/services/frontend/src/components/Tabs.tsx @@ -9,13 +9,29 @@ export type Tab = { id: string; label: string; content: ReactNode }; * shared link opens the same tab. Hidden panels stay mounted: a running * analysis keeps polling while another tab is open. */ +/** Opens a tab from anywhere on the page (also when the hash is already that tab). */ +export function openTab(id: string) { + history.replaceState(null, "", `#${id}`); + window.dispatchEvent(new HashChangeEvent("hashchange")); +} + export function Tabs({ tabs, label }: { tabs: Tab[]; label: string }) { const [active, setActive] = useState(tabs[0]?.id); const buttons = useRef<(HTMLButtonElement | null)[]>([]); + const root = useRef(null); + + // A link to # (on load, or from elsewhere on the page) opens that tab and scrolls to it. useEffect(() => { - const fromHash = window.location.hash.slice(1); - if (tabs.some((t) => t.id === fromHash)) setActive(fromHash); + const open = () => { + const id = window.location.hash.slice(1); + if (!tabs.some((t) => t.id === id)) return; + setActive(id); + root.current?.scrollIntoView({ behavior: "smooth", block: "start" }); + }; + open(); + window.addEventListener("hashchange", open); + return () => window.removeEventListener("hashchange", open); }, [tabs]); function choose(id: string) { @@ -33,7 +49,7 @@ export function Tabs({ tabs, label }: { tabs: Tab[]; label: string }) { } return ( -
+
{tabs.map((t, i) => ( {onCancel && ( + + {open && ( +
+ +
+ {canAdd && + Új személy} + Összes képlet +
+
+ )} +
+ ); +} diff --git a/services/frontend/src/components/PersonActions.tsx b/services/frontend/src/components/PersonActions.tsx new file mode 100644 index 0000000..2138c2f --- /dev/null +++ b/services/frontend/src/components/PersonActions.tsx @@ -0,0 +1,59 @@ +"use client"; + +import Link from "next/link"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +import { api, errorText } from "@/lib/api"; + +/** Correct (while allowed) or delete a person. */ +export function PersonActions({ id, name, editable }: { id: string; name: string; editable: boolean }) { + const router = useRouter(); + const [confirm, setConfirm] = useState(false); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + + async function remove() { + setBusy(true); + setError(null); + try { + await api(`/charts/${id}`, { method: "DELETE" }); + router.refresh(); + } catch (e) { + setError(errorText(e)); + setBusy(false); + } + } + + return ( +
+ {confirm ? ( + <> + Törlöd {name} képletét és elemzéseit? A hely nem szabadul fel. + + + + ) : ( + <> + {editable && ( + + Adatok javítása + + )} + + + )} + {error && ( +

+ {error} +

+ )} +
+ ); +} diff --git a/services/frontend/src/components/PersonPacks.tsx b/services/frontend/src/components/PersonPacks.tsx new file mode 100644 index 0000000..fe5bfd4 --- /dev/null +++ b/services/frontend/src/components/PersonPacks.tsx @@ -0,0 +1,64 @@ +"use client"; + +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +import { api, errorText } from "@/lib/api"; + +/** + * Person packages: a few more persons, or any number. Until Stripe is + * connected the payment is a stand-in (MOCK_PAYMENTS) that grants it at once. + */ +export function PersonPacks({ packSize, canPay }: { packSize: number; canPay: boolean }) { + const router = useRouter(); + const [busy, setBusy] = useState(null); + const [error, setError] = useState(null); + + async function buy(pkg: "persons" | "persons_unlimited") { + setBusy(pkg); + setError(null); + try { + await api("/payments/mock", { body: { package: pkg } }); + router.refresh(); + } catch (e) { + setError(errorText(e)); + } finally { + setBusy(null); + } + } + + if (!canPay) { + return

További személyekhez csomag kell; a csomagok hamarosan elérhetők.

; + } + return ( +
+
+
+ +{packSize} személy + Még {packSize} ember képlete és elemzése. + +
+
+ Korlátlan + Bárkit felvehetsz, nincs felső határ. + +
+
+ {error && ( +

+ {error} +

+ )} +

Tesztüzem: a fizetés még nincs bekötve, a gomb nem terhel semmit.

+
+ ); +} diff --git a/services/frontend/src/components/SiteHeader.tsx b/services/frontend/src/components/SiteHeader.tsx index 4fdeb85..bba7443 100644 --- a/services/frontend/src/components/SiteHeader.tsx +++ b/services/frontend/src/components/SiteHeader.tsx @@ -15,7 +15,7 @@ export function Logo() { export function SiteHeader({ me }: { me: Me }) { const links = [ - { href: "/keplet", label: "Képletem" }, + { href: "/kepletek", label: "Képletek" }, { href: "/profil", label: "Profil" }, ]; if (me.user.roles.includes("admin")) links.push({ href: "/admin", label: "Admin" }); diff --git a/services/frontend/src/lib/types.ts b/services/frontend/src/lib/types.ts index 12cfe8f..726c021 100644 --- a/services/frontend/src/lib/types.ts +++ b/services/frontend/src/lib/types.ts @@ -18,6 +18,15 @@ export interface Me { primary_chart_id: string | null; analyses_left: UnitBalance; birth_change: BirthChange; + persons: PersonSlots; +} + +/** How many persons the user may still add (`left`/`limit` null: no limit). */ +export interface PersonSlots { + used: number; + limit: number | null; + left: number | null; + unlimited: boolean; } /** Limit on changing the own birth data (the notice text comes from the backend). */ @@ -41,6 +50,7 @@ export interface PublicConfig { password_login: boolean; password_min_length: number; mock_payments: boolean; + person_pack_size: number; } export interface Position { @@ -87,16 +97,33 @@ export interface BirthData { geonames_id?: number | null; } +export type ChartKind = "own" | "person"; + export interface Chart { id: string; label: string; is_primary: boolean; + kind: ChartKind; + /** A person's birth data can be corrected until then (admins: any time). */ + editable_until: string | null; birth_data: BirthData; highlights: { sun: string | null; moon: string | null; ascendant: string | null; time_known: boolean }; chart: ChartResult; created_at: string; } +/** A chart in the list (`GET /v1/charts`). */ +export interface ChartListItem { + id: string; + label: string; + is_primary: boolean; + kind: ChartKind; + editable_until: string | null; + birth: { date: string; time: string | null; place: string | null }; + highlights: Chart["highlights"]; + created_at: string; +} + export interface Analysis { id: string; kind: "natal" | "synastry" | "summary"; -- 2.54.0 From 0791998c131619590771526a356ebbf0d8315f83 Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 11:20:26 +0000 Subject: [PATCH 6/8] =?UTF-8?q?Own=20chart=20back=20on=20the=20K=C3=A9plet?= =?UTF-8?q?em=20menu;=20persons=20get=20their=20own=20menu,=20page=20and?= =?UTF-8?q?=20a=20tile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/globals.css | 6 ++ .../app/kepletek/[id]/javitas/EditPerson.tsx | 2 +- .../frontend/src/app/kepletek/[id]/page.tsx | 20 ++++- services/frontend/src/app/kepletek/page.tsx | 89 +------------------ services/frontend/src/app/szemelyek/page.tsx | 78 ++++++++++++++++ .../{kepletek => szemelyek}/uj/NewPerson.tsx | 2 +- .../app/{kepletek => szemelyek}/uj/page.tsx | 2 +- .../frontend/src/components/ChartSwitcher.tsx | 4 +- .../frontend/src/components/SiteHeader.tsx | 3 +- 9 files changed, 114 insertions(+), 92 deletions(-) create mode 100644 services/frontend/src/app/szemelyek/page.tsx rename services/frontend/src/app/{kepletek => szemelyek}/uj/NewPerson.tsx (86%) rename services/frontend/src/app/{kepletek => szemelyek}/uj/page.tsx (96%) diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index fec995d..2dce34f 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -388,3 +388,9 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .switcher-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 12px 6px; font-size: 14px; } .switcher-foot a { color: var(--gold); text-decoration: none; } .switcher-foot a:hover { text-decoration: underline; } + +.persons-tile { position: relative; gap: 4px; padding: 16px 48px 16px 20px; color: inherit; text-decoration: none; transition: border-color 0.15s; } +.persons-tile:hover { border-color: var(--gold); } +.persons-tile strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; } +.persons-tile .muted { font-size: 14px; } +.persons-tile-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 20px; } diff --git a/services/frontend/src/app/kepletek/[id]/javitas/EditPerson.tsx b/services/frontend/src/app/kepletek/[id]/javitas/EditPerson.tsx index bdbdd34..c2d52cf 100644 --- a/services/frontend/src/app/kepletek/[id]/javitas/EditPerson.tsx +++ b/services/frontend/src/app/kepletek/[id]/javitas/EditPerson.tsx @@ -19,7 +19,7 @@ export function EditPerson({ router.push("/kepletek")} + onCancel={() => router.push("/szemelyek")} onSaved={() => { router.push(`/kepletek/${id}`); router.refresh(); diff --git a/services/frontend/src/app/kepletek/[id]/page.tsx b/services/frontend/src/app/kepletek/[id]/page.tsx index 3f02e38..9fe79ab 100644 --- a/services/frontend/src/app/kepletek/[id]/page.tsx +++ b/services/frontend/src/app/kepletek/[id]/page.tsx @@ -1,4 +1,5 @@ import type { Metadata } from "next"; +import Link from "next/link"; import { notFound } from "next/navigation"; import { AspectGrid, AspectList, BigThree, PositionTables } from "@/components/ChartTables"; @@ -29,6 +30,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri backendGet<{ charts: ChartListItem[] }>("/v1/charts"), ]); const charts = chartList?.charts ?? []; + const persons = charts.filter((c) => c.kind === "person"); if (!chart) notFound(); const list = analyses?.analyses ?? []; const summary = list.find((a) => a.kind === "summary" && a.status !== "failed") ?? null; @@ -50,7 +52,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri title={chart.is_primary ? "Születési képletem" : chart.label} currentId={chart.id} own={charts.find((c) => c.is_primary) ?? null} - persons={charts.filter((c) => c.kind === "person")} + persons={persons} canAdd={me.persons.left !== 0} />

@@ -114,6 +116,22 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri )}

)} + {chart.is_primary && ( + + Személyek + + {persons.length > 0 ? `${persons.length} felvett személy` : "Társad, családod képlete"} + + + {persons.length > 0 + ? persons.slice(0, 3).map((p) => p.label).join(", ") + (persons.length > 3 ? "…" : "") + : "Vedd fel őket, és nézd meg az ő képletüket és elemzésüket is."} + + + + )}
diff --git a/services/frontend/src/app/kepletek/page.tsx b/services/frontend/src/app/kepletek/page.tsx index bb1e684..2130142 100644 --- a/services/frontend/src/app/kepletek/page.tsx +++ b/services/frontend/src/app/kepletek/page.tsx @@ -1,87 +1,6 @@ -import type { Metadata } from "next"; -import Link from "next/link"; +import { redirect } from "next/navigation"; -import { ChartCard } from "@/components/ChartCard"; -import { PersonActions } from "@/components/PersonActions"; -import { PersonPacks } from "@/components/PersonPacks"; -import { backendGet, requireMe } from "@/lib/server"; -import type { ChartListItem, PublicConfig } from "@/lib/types"; - -export const metadata: Metadata = { title: "Képletek" }; - -/** The user's own chart and the persons they added, with room for a new one. */ -export default async function ChartsPage() { - const me = await requireMe("/kepletek"); - const [list, config] = await Promise.all([ - backendGet<{ charts: ChartListItem[] }>("/v1/charts"), - backendGet("/v1/config"), - ]); - const charts = list?.charts ?? []; - const own = charts.find((c) => c.is_primary); - const persons = charts.filter((c) => c.kind === "person"); - const isAdmin = me.user.roles.includes("admin"); - const slots = me.persons; - const full = slots.left === 0; - const now = Date.now(); - - return ( -
-
-

Képletek

-

A saját képleted és azoké, akiket felvettél: mindegyikhez kérhetsz részletes elemzést.

-
- -
- {own ? ( - - Saját képletem - - ) : ( - - Én - Add meg a születési adataidat a profilodban. - - )} - - {persons.map((p) => ( - - now)} - /> - - ))} - - {!full && ( - - - Új személy - - {slots.unlimited ? "Korlátlan számú személy" : `Még ${slots.left} személyt vehetsz fel`} - - - )} -
- - {!slots.unlimited && ( -
-
-

Személyek

- - {slots.used} / {slots.limit} hely - -
-

- {full - ? "Elfogytak a helyeid. Újabb személyhez válassz csomagot." - : "A felvett személyek képletét és elemzéseit itt éred el. Egy törölt személy helye nem szabadul fel."} -

- -
- )} -
- ); +// The persons list moved to /szemelyek. +export default function ChartsIndex() { + redirect("/szemelyek"); } diff --git a/services/frontend/src/app/szemelyek/page.tsx b/services/frontend/src/app/szemelyek/page.tsx new file mode 100644 index 0000000..88160b1 --- /dev/null +++ b/services/frontend/src/app/szemelyek/page.tsx @@ -0,0 +1,78 @@ +import type { Metadata } from "next"; +import Link from "next/link"; + +import { ChartCard } from "@/components/ChartCard"; +import { PersonActions } from "@/components/PersonActions"; +import { PersonPacks } from "@/components/PersonPacks"; +import { backendGet, requireMe } from "@/lib/server"; +import type { ChartListItem, PublicConfig } from "@/lib/types"; + +export const metadata: Metadata = { title: "Személyek" }; + +/** The persons the user added, with room for a new one. */ +export default async function PersonsPage() { + const me = await requireMe("/szemelyek"); + const [list, config] = await Promise.all([ + backendGet<{ charts: ChartListItem[] }>("/v1/charts"), + backendGet("/v1/config"), + ]); + const charts = list?.charts ?? []; + const persons = charts.filter((c) => c.kind === "person"); + const isAdmin = me.user.roles.includes("admin"); + const slots = me.persons; + const full = slots.left === 0; + const now = Date.now(); + + return ( +
+
+

Személyek

+

+ Társad, családtagjaid, barátaid képlete. Mindegyikhez kérhetsz részletes elemzést, és a képletoldal címére + kattintva válthatsz köztük. +

+
+ +
+ {persons.map((p) => ( + + now)} + /> + + ))} + + {!full && ( + + + Új személy + + {slots.unlimited ? "Korlátlan számú személy" : `Még ${slots.left} személyt vehetsz fel`} + + + )} +
+ + {!slots.unlimited && ( +
+
+

Személyek

+ + {slots.used} / {slots.limit} hely + +
+

+ {full + ? "Elfogytak a helyeid. Újabb személyhez válassz csomagot." + : "A felvett személyek képletét és elemzéseit itt éred el. Egy törölt személy helye nem szabadul fel."} +

+ +
+ )} +
+ ); +} diff --git a/services/frontend/src/app/kepletek/uj/NewPerson.tsx b/services/frontend/src/app/szemelyek/uj/NewPerson.tsx similarity index 86% rename from services/frontend/src/app/kepletek/uj/NewPerson.tsx rename to services/frontend/src/app/szemelyek/uj/NewPerson.tsx index 7b29214..727c733 100644 --- a/services/frontend/src/app/kepletek/uj/NewPerson.tsx +++ b/services/frontend/src/app/szemelyek/uj/NewPerson.tsx @@ -10,7 +10,7 @@ export function NewPerson() { router.push("/kepletek")} + onCancel={() => router.push("/szemelyek")} onSaved={(id) => router.push(`/kepletek/${id}`)} /> ); diff --git a/services/frontend/src/app/kepletek/uj/page.tsx b/services/frontend/src/app/szemelyek/uj/page.tsx similarity index 96% rename from services/frontend/src/app/kepletek/uj/page.tsx rename to services/frontend/src/app/szemelyek/uj/page.tsx index 3b06128..ddfc7c1 100644 --- a/services/frontend/src/app/kepletek/uj/page.tsx +++ b/services/frontend/src/app/szemelyek/uj/page.tsx @@ -9,7 +9,7 @@ import { NewPerson } from "./NewPerson"; export const metadata: Metadata = { title: "Új személy" }; export default async function NewPersonPage() { - const me = await requireMe("/kepletek/uj"); + const me = await requireMe("/szemelyek/uj"); const config = await backendGet("/v1/config"); const slots = me.persons; diff --git a/services/frontend/src/components/ChartSwitcher.tsx b/services/frontend/src/components/ChartSwitcher.tsx index 22d526d..b14bcaf 100644 --- a/services/frontend/src/components/ChartSwitcher.tsx +++ b/services/frontend/src/components/ChartSwitcher.tsx @@ -83,8 +83,8 @@ export function ChartSwitcher({ ))}
- {canAdd && + Új személy} - Összes képlet + {canAdd && + Új személy} + Személyek
)} diff --git a/services/frontend/src/components/SiteHeader.tsx b/services/frontend/src/components/SiteHeader.tsx index bba7443..1da2ab2 100644 --- a/services/frontend/src/components/SiteHeader.tsx +++ b/services/frontend/src/components/SiteHeader.tsx @@ -15,7 +15,8 @@ export function Logo() { export function SiteHeader({ me }: { me: Me }) { const links = [ - { href: "/kepletek", label: "Képletek" }, + { href: "/keplet", label: "Képletem" }, + { href: "/szemelyek", label: "Személyek" }, { href: "/profil", label: "Profil" }, ]; if (me.user.roles.includes("admin")) links.push({ href: "/admin", label: "Admin" }); -- 2.54.0 From 786696bb1e5bfd9bb66fc19624dae5e7325bceea Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 11:55:08 +0000 Subject: [PATCH 7/8] Privacy policy page (public), data export and account deletion in the profile Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- deploy/Caddyfile | 4 +- .../frontend/src/app/adatvedelem/page.tsx | 199 ++++++++++++++++++ services/frontend/src/app/belepes/page.tsx | 3 +- services/frontend/src/app/globals.css | 10 + .../frontend/src/app/profil/AccountData.tsx | 71 +++++++ services/frontend/src/app/profil/page.tsx | 10 + services/frontend/src/lib/legal.ts | 10 + 7 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 services/frontend/src/app/adatvedelem/page.tsx create mode 100644 services/frontend/src/app/profil/AccountData.tsx create mode 100644 services/frontend/src/lib/legal.ts diff --git a/deploy/Caddyfile b/deploy/Caddyfile index d8ad9fd..2cc5dbe 100644 --- a/deploy/Caddyfile +++ b/deploy/Caddyfile @@ -12,7 +12,9 @@ {$DOMAIN} { # Temporary gate until launch (user sf, password sf). Remove this block to open the site. - basic_auth { + # The privacy policy stays public (Google's OAuth consent screen links to it). + @gated not path /adatvedelem /_next/static/* /favicon.ico /icon* + basic_auth @gated { sf $2a$14$oggzzuNO41uGS5M.TCMlB.bQ6fdXUHtNLx9XahWyKLHjRlpEP1XN6 } encode zstd gzip diff --git a/services/frontend/src/app/adatvedelem/page.tsx b/services/frontend/src/app/adatvedelem/page.tsx new file mode 100644 index 0000000..91e25b9 --- /dev/null +++ b/services/frontend/src/app/adatvedelem/page.tsx @@ -0,0 +1,199 @@ +import type { Metadata } from "next"; +import Link from "next/link"; + +import { Logo } from "@/components/SiteHeader"; +import { OPERATOR, PRIVACY_UPDATED } from "@/lib/legal"; +import { getMe } from "@/lib/server"; + +export const metadata: Metadata = { + title: "Adatvédelmi tájékoztató", + description: "Hogyan kezeli a Sorsfonalak a személyes adataidat.", +}; + +/** Privacy policy: public, also for visitors who are not logged in. */ +export default async function PrivacyPage() { + const me = await getMe(); + return ( + <> + {!me && ( +
+ +
+ )} +
+
+

Adatvédelmi tájékoztató

+

Hatályos: {PRIVACY_UPDATED}

+
+ +
+

1. Ki kezeli az adataidat?

+

+ A Sorsfonalak szolgáltatás (sorsfonalak.hu) adatkezelője: {OPERATOR.name}, {OPERATOR.address} + {OPERATOR.registration ? `, ${OPERATOR.registration}` : ""}. Adatvédelmi kérdésekben itt érsz el minket:{" "} + {OPERATOR.email}. +

+
+ +
+

2. Milyen adatokat kezelünk, és miért?

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AdatCélJogalap
Google-fiókod neve, e-mail-címe és azonosítója (belépéskor a Google adja át)Fiókod létrehozása, belépés, kapcsolattartásSzerződés teljesítése (GDPR 6. cikk (1) b)
Megjelenített név, az elemzések nyelveA szolgáltatás személyre szabásaSzerződés teljesítése
Születési adataid: dátum, időpont, helyA születési képleted kiszámítása és az elemzések elkészítéseSzerződés teljesítése
Az általad felvett személyek neve és születési adataiAz ő képletük és elemzésük elkészítése a kérésedreSzerződés teljesítése; a felvételhez az érintett beleegyezése szükséges (lásd 4. pont)
A képletek és az elkészült elemzésekHogy bármikor újra megnézhesd őketSzerződés teljesítése
Vásárlásaid és felhasznált kereteid (elemzések, személyek)A megvásárolt szolgáltatás nyújtása, elszámolásSzerződés teljesítése; számviteli kötelezettség (6. cikk (1) c)
IP-cím, böngésző adatai, a kérések ideje (szervernaplók)Biztonság, hibakeresés, visszaélések kiszűréseJogos érdek (6. cikk (1) f)
+

+ Bankkártyaadatot nem kezelünk és nem tárolunk; a fizetést, amikor elindul, külső fizetési szolgáltató + végzi, akinek a neve itt lesz feltüntetve. +

+
+ +
+

3. Az elemzések és a mesterséges intelligencia

+

+ A rövid összefoglalót és a részletes elemzést nagy nyelvi modell (mesterséges intelligencia) írja. A + modellhez csak a képlet csillagászati adatai jutnak el (a bolygók jegye, foka, háza és + fényszögei). Nevet, e-mail-címet, születési dátumot, időpontot vagy helyet nem küldünk el. Az elemzés + szórakoztató és önismereti célú szöveg, nem minősül egészségügyi, pénzügyi, jogi vagy más szakmai + tanácsnak. +

+
+ +
+

4. Más emberek adatai

+

+ Ha valaki más (például társad vagy családtagod) születési adatait veszed fel, kérjük, csak az ő + beleegyezésével tedd. Az ő adatait kizárólag te látod; tőlünk senki más nem kapja meg. Az általad felvett + személyt bármikor törölheted, ezzel a képlete és az elemzései is törlődnek. +

+
+ +
+

5. Kik férnek hozzá az adatokhoz? (adatfeldolgozók)

+
    +
  • + DigitalOcean, LLC – a szerverek üzemeltetése; az adatok az Európai Unióban (Amszterdam) + vannak tárolva. +
  • +
  • + Cloudflare, Inc. – a forgalom továbbítása és a támadások elleni védelem; az oldal + letöltésekor kezeli az IP-címedet és a kérés adatait. +
  • +
  • + Google LLC – bejelentkezés Google-fiókkal. +
  • +
  • + OpenRouter, Inc. és az általa elért modellszolgáltató (jelenleg{" "} + Anthropic PBC) – az elemzések megírása, kizárólag a 3. pontban leírt csillagászati + adatokból. +
  • +
+

+ Ezek közül néhány szolgáltató az Egyesült Államokban működik. Az adattovábbítás az EU–USA adatvédelmi + keretrendszer (Data Privacy Framework) vagy az Európai Bizottság általános szerződési feltételei + (SCC) alapján történik. +

+
+ +
+

6. Meddig őrizzük az adatokat?

+
    +
  • Fiókod adatait, képleteidet és elemzéseidet a fiókod törléséig.
  • +
  • A biztonsági mentésekből a törölt adatok legkésőbb 14 nap után tűnnek el.
  • +
  • A szervernaplókat legfeljebb 30 napig őrizzük.
  • +
  • A számlázáshoz szükséges adatokat a számviteli törvény szerinti ideig (8 évig) őrizzük.
  • +
+
+ +
+

7. Sütik

+

+ Csak egy, a működéshez feltétlenül szükséges sütit használunk (sf_session), amely belépve + tart. Reklám- vagy követő sütiket, illetve látogatottságmérőt nem használunk. +

+
+ +
+

8. A jogaid

+
    +
  • + Hozzáférés és adathordozhatóság: a Profil oldalon + egy kattintással letöltheted minden adatodat. +
  • +
  • + Helyesbítés: a nevedet és a születési adataidat a Profil oldalon módosíthatod. +
  • +
  • + Törlés: a fiókodat és minden adatodat a Profil oldalon törölheted. +
  • +
  • + Korlátozás és tiltakozás: a fenti e-mail-címen kérheted. +
  • +
+

+ Kérésedre legkésőbb egy hónapon belül válaszolunk. Ha úgy érzed, megsértettük a jogaidat, panaszt tehetsz + a Nemzeti Adatvédelmi és Információszabadság Hatóságnál (NAIH, 1055 Budapest, Falk Miksa utca 9–11.,{" "} + + naih.hu + + ), vagy bírósághoz fordulhatsz. +

+
+ +
+

9. Korhatár

+

A szolgáltatást 16 éven felüliek használhatják.

+
+ +
+

10. Változások

+

+ Ha a tájékoztató lényegesen változik, a belépéskor vagy e-mailben jelezzük. A mindenkori változat ezen az + oldalon olvasható. +

+
+
+ + ); +} diff --git a/services/frontend/src/app/belepes/page.tsx b/services/frontend/src/app/belepes/page.tsx index 5e1da3d..df81596 100644 --- a/services/frontend/src/app/belepes/page.tsx +++ b/services/frontend/src/app/belepes/page.tsx @@ -1,4 +1,5 @@ import type { Metadata } from "next"; +import Link from "next/link"; import { redirect } from "next/navigation"; import { Logo } from "@/components/SiteHeader"; @@ -63,7 +64,7 @@ export default async function LoginPage({ searchParams }: { searchParams: Promis

Még nincs fiókod? Az első belépéskor létrejön.

A belépéssel elfogadod, hogy a születési adataidat a képleted kiszámításához tároljuk. Bármikor törölheted - őket a profilodban. + őket a profilodban. Részletek: adatvédelmi tájékoztató.

diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 2dce34f..0dde22a 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -394,3 +394,13 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } .persons-tile strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; } .persons-tile .muted { font-size: 14px; } .persons-tile-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 20px; } + +/* Legal pages */ +.legal { max-width: 820px; gap: 28px; } +.legal section { display: flex; flex-direction: column; gap: 10px; } +.legal h2 { font-size: 24px; } +.legal p, .legal li { line-height: 1.7; color: var(--ink-2); } +.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; } +.legal a { color: var(--gold); } +.legal-table td { vertical-align: top; line-height: 1.5; } +.danger-box { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--danger); border-radius: var(--radius); } diff --git a/services/frontend/src/app/profil/AccountData.tsx b/services/frontend/src/app/profil/AccountData.tsx new file mode 100644 index 0000000..9f1edc6 --- /dev/null +++ b/services/frontend/src/app/profil/AccountData.tsx @@ -0,0 +1,71 @@ +"use client"; + +import { useState } from "react"; + +import { api, errorText } from "@/lib/api"; + +/** GDPR: download all data, delete the account. */ +export function AccountData() { + const [confirm, setConfirm] = useState(false); + const [typed, setTyped] = useState(""); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + + async function remove() { + setBusy(true); + setError(null); + try { + await api("/me", { method: "DELETE", body: { confirm: "DELETE" } }); + window.location.href = "/belepes"; + } catch (e) { + setError(errorText(e)); + setBusy(false); + } + } + + return ( +
+
+ + Adataim letöltése + + Minden adatod egy JSON-fájlban: fiók, képletek, elemzések, vásárlások. +
+ {confirm ? ( +
+

+ A fiókod végleg törlődik a képleteiddel, a felvett személyekkel és az összes elemzéssel együtt. Ez nem + vonható vissza. A megerősítéshez írd be: TÖRLÉS +

+ setTyped(e.target.value)} + aria-label="Írd be: TÖRLÉS" + autoComplete="off" + /> +
+ + +
+ {error && ( +

+ {error} +

+ )} +
+ ) : ( +
+ +
+ )} +
+ ); +} diff --git a/services/frontend/src/app/profil/page.tsx b/services/frontend/src/app/profil/page.tsx index 05abf8d..de40003 100644 --- a/services/frontend/src/app/profil/page.tsx +++ b/services/frontend/src/app/profil/page.tsx @@ -1,9 +1,11 @@ import type { Metadata } from "next"; +import Link from "next/link"; import { ROLE_LABELS, formatDate } from "@/lib/astro"; import { backendGet, requireMe } from "@/lib/server"; import type { Chart } from "@/lib/types"; +import { AccountData } from "./AccountData"; import { BirthEditor } from "./BirthEditor"; import { ProfileForm } from "./ProfileForm"; @@ -80,6 +82,14 @@ export default async function ProfilePage() { notice={me.birth_change.notice} />
+ +
+

Adataim

+

+ Hogyan kezeljük az adataidat: adatvédelmi tájékoztató. +

+ +
); } diff --git a/services/frontend/src/lib/legal.ts b/services/frontend/src/lib/legal.ts new file mode 100644 index 0000000..855017d --- /dev/null +++ b/services/frontend/src/lib/legal.ts @@ -0,0 +1,10 @@ +// Operator details shown on the legal pages. Fill these in before launch. +export const OPERATOR = { + name: "[Üzemeltető neve – kitöltendő]", + address: "[Székhely / postacím – kitöltendő]", + email: "[Kapcsolattartási e-mail – kitöltendő]", + /** Company registration and tax number, if the operator is a company. */ + registration: null as string | null, +}; + +export const PRIVACY_UPDATED = "2026. november 17."; -- 2.54.0 From ae9b1b31a9074cc4e99f6a5686f932c069f3bdc1 Mon Sep 17 00:00:00 2001 From: feco Date: Tue, 17 Nov 2026 11:55:27 +0000 Subject: [PATCH 8/8] Deploy: reload Caddy so Caddyfile changes take effect Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- .gitea/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0769418..9c976db 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -134,6 +134,7 @@ jobs: ssh "$HOST" "cd '$DIR' && \ (grep -q '^TAG=' .env && sed -i 's/^TAG=.*/TAG=$tag/' .env || echo 'TAG=$tag' >> .env) && \ docker compose pull -q && docker compose up -d --remove-orphans --wait && \ + docker compose exec -T caddy caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile && \ docker image prune -f >/dev/null" # A release (and its tag, e.g. v2026.11.17-163612e) for every deployment, # listing the commits since the previous one. -- 2.54.0