Gym check-in: Settings switch to turn the feature off

Off hides the Home card and the /checkin route; saved cards stay. On by default,
profiles without the key read as on. pt-BR: trailing comma the MR's last override
line was missing, override count 600.
This commit is contained in:
Duarte Santos committed 2026-09-04 14:42:48 +02:00
1 parent 3197f9e9be
commit 0af9f55528
20 files changed
+64 -7

No files matched your search

+3 -2
View File
@@ -96,8 +96,9 @@ export default function Home() {
</div>
{/* Mobile-only: jump to the gym check-in cards (QR membership codes). Shown here as a quick
tap on arrival at the gym; the whole feature folds away in web/demo builds via MOBILE. */}
{MOBILE && (
tap on arrival at the gym; the whole feature folds away in web/demo builds via MOBILE,
and per user via the "Gym check-in" switch in Settings. */}
{MOBILE && S.checkIn !== false && (
<div className="card tappable" style={{ cursor: 'pointer' }} {...tappable(() => nav('/checkin'))}>
<div className="row between">
<div className="row" style={{ gap: 9 }}>
+6
View File
@@ -140,6 +140,12 @@ export default function Settings() {
options={[{ value: MONDAY, label: t('Monday') }, { value: SUNDAY, label: t('Sunday') }]}
value={weekStartOf(S)} onChange={v => update(s => { s.weekStart = v })} />
</Row>
{/* Membership QR codes on Home (views/CheckIn.jsx). Only the app can scan and show them
at a turnstile, so the switch exists only there; off = no Home card, no route. */}
{MOBILE && <Row icon="qr" iconTint="var(--blue)" title={t('Gym check-in')}
subtitle={t('Show a card on Home with your membership QR codes.')}>
<Switch checked={S.checkIn !== false} onChange={v => update(s => { s.checkIn = v })} />
</Row>}
</Section>
{/* ---------- during a workout ---------- */}