Promo codes; purchases off in production
Admins make promo codes for a package (Admin → Promókódok: batch, note, copy all), list them filtered (unused by default, used, revoked; by package; by code, note or redeemer) and withdraw unused ones. A logged-in user redeems a code once (header link, /bevaltas?kod=... prefilled, packages page, and the analysis and question offers point there) and gets the package as an order with source 'promo'. Failed redemptions are rate limited. Production purchases are off: MOCK_PAYMENTS now defaults to false in the deploy compose, so package cards say 'Hamarosan'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -722,3 +722,24 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.share-cta { gap: 12px; }
|
||||
.share-cta h2 { font-size: 24px; }
|
||||
.share-cta .btn { align-self: flex-start; }
|
||||
|
||||
/* Promo codes: redeeming (header, packages page, /bevaltas) and the admin page */
|
||||
.redeem-link { color: var(--ink-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
|
||||
.redeem-link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
|
||||
.redeem { display: flex; flex-direction: column; gap: 8px; }
|
||||
.redeem-row { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.redeem-input { flex: 1 1 220px; width: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.5px; text-transform: uppercase; }
|
||||
.redeem-card { gap: 10px; border-color: rgba(217, 180, 106, 0.35); }
|
||||
.redeem-card h2 { font-size: 24px; }
|
||||
.promo-form { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 2fr) auto; gap: 12px; align-items: end; }
|
||||
.promo-made { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
|
||||
.promo-codes { min-height: 0; padding: 10px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6; resize: vertical; }
|
||||
.promo-code { font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
|
||||
.promo-table td { vertical-align: top; }
|
||||
.promo-table td .hint { display: block; }
|
||||
.promo-open { color: var(--ok); }
|
||||
@media (max-width: 760px) {
|
||||
.promo-form { grid-template-columns: minmax(0, 1fr) 100px; }
|
||||
.promo-form .promo-note, .promo-form .btn { grid-column: 1 / -1; }
|
||||
}
|
||||
@media (max-width: 640px) { .who { flex-wrap: wrap; gap: 8px 12px; } }
|
||||
|
||||
Reference in New Issue
Block a user