Inviting shown but off until launch; waitlist confirmation; waitlist invites with a package
CI / test (push) Successful in 1m35s
CI / build (push) Successful in 8m7s
CI / deploy (push) Skipped

USER_INVITES (default false) keeps users from inviting others until the
launch: the 'Meghívom' option and a 'Hívd meg, akit szeretsz' card on the
persons page are shown, disabled, with 'Hamarosan'; the backend refuses
with invites_disabled (admins may always).

Joining the waitlist sends one confirmation e-mail (waitlist_joined) with a
link that takes the address off the list and opts it out; at most 10 per
address in 15 minutes. Admins can pick a package for waitlist invitations,
like on the invitation form.

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-19 11:07:13 +00:00
co-authored by Claude Opus 5.5
parent dad16fe463
commit 8e1205359d
18 changed files with 285 additions and 26 deletions
+39 -14
View File
@@ -23,6 +23,7 @@ export default async function PersonsPage() {
const isAdmin = me.user.roles.includes("admin");
const slots = me.persons;
const full = slots.left === 0;
const invitesOpen = (config?.user_invites ?? false) || isAdmin;
const now = Date.now();
return (
@@ -47,22 +48,46 @@ export default async function PersonsPage() {
</ChartCard>
))}
<Link href="/szemelyek/uj" className="chart-card chart-card-new">
<span className="chart-card-plus" aria-hidden="true">
+
</span>
<strong className="chart-card-name">Új személy</strong>
<span className="muted">
{full
? "Meghívással bármikor"
: slots.unlimited
? "Adatokkal vagy meghívással"
: `Még ${slots.left} személyt vehetsz fel, vagy hívd meg`}
</span>
</Link>
{(!full || invitesOpen) && (
<Link href="/szemelyek/uj" className="chart-card chart-card-new">
<span className="chart-card-plus" aria-hidden="true">
+
</span>
<strong className="chart-card-name">Új személy</strong>
<span className="muted">
{!invitesOpen
? slots.unlimited
? "Korlátlan számú személy"
: `Még ${slots.left} személyt vehetsz fel`
: full
? "Meghívással bármikor"
: slots.unlimited
? "Adatokkal vagy meghívással"
: `Még ${slots.left} személyt vehetsz fel, vagy hívd meg`}
</span>
</Link>
)}
</div>
<PendingInvites />
{invitesOpen ? (
<PendingInvites />
) : (
<section className="card invite-soon" aria-labelledby="invite-soon-title">
<div className="card-head">
<h2 id="invite-soon-title">Hívd meg, akit szeretsz</h2>
<span className="badge">Hamarosan</span>
</div>
<p className="muted">
Hamarosan te is meghívhatod a barátaidat, a családodat vagy a párodat: ők megadják a saját születési adataikat,
ingyen megkapják a képletüket, és együtt megnézitek, mennyire illetek össze.
</p>
<div>
<button type="button" className="btn" disabled>
Meghívó küldése
</button>
</div>
</section>
)}
{!slots.unlimited && (
<section className="card" aria-labelledby="slots-title">