feat(checkin): gym membership QR check-in (mobile-only)

Add a mobile-only gym check-in screen: saved membership codes shown as
QR codes in a swipeable carousel, reached from a 'Check in' card on Home.
Cards are added by typing the code, importing a photo, or scanning with
the camera. Only the code value + symbology are stored — never a photo;
the QR is regenerated from the value on every display.

Rendering uses lean-qr (MIT); camera scan and photo decode use
@capacitor-mlkit/barcode-scanning (Apache-2.0), pinned to the 7.x line
for Capacitor 7. Both are documented in NOTICE.md and bundled only in the
mobile build — the whole feature folds away in web/demo builds via MOBILE,
so nothing new lands in the web bundle. No backend/schema change: gymCards
rides the existing state sync and backup like every other field.

Non-QR symbologies are readable but not reproducible, so capture refuses
them rather than storing a code that would display wrong bars.

Native wiring: CAMERA permission + ML Kit barcode_ui meta-data
(AndroidManifest), NSCameraUsageDescription (iOS Info.plist), mlkit plugin
registered via cap sync. Debug builds get an applicationIdSuffix '.test'
and an 'OpenGymTest' label so a test build installs alongside the real app.
This commit is contained in:
Sebastian G committed 2026-09-03 11:10:58 +02:00
1 parent 272bf785ee
commit a797729dd0
19 files changed
+587

No files matched your search

+25
View File
@@ -743,4 +743,29 @@ export default {
'Set to 0 to go back to the default ({0}).': 'Pon 0 para volver al valor por defecto ({0}).',
'Applies to this exercise everywhere, not just this plan.': 'Se aplica a este ejercicio en todas partes, no solo en este plan.',
'You still log the total weight — the bar only feeds the per-side plate math.': 'Sigues registrando el peso total — la barra solo se usa para calcular los discos por lado.',
// Gym check-in (mobile-only)
'Check in': 'Registrarse',
'At the gym': 'En el gimnasio',
'Show this at the gym': 'Muestra esto en el gimnasio',
'Add your gym card': 'Añade tu tarjeta del gimnasio',
'Add a card': 'Añadir una tarjeta',
'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Escribe el número de tu tarjeta de socio, importa una foto o escanéala con la cámara. No hace falta otra app en el gimnasio — solo abre esta pantalla.',
'Remove this card?': '¿Eliminar esta tarjeta?',
'Scan it, import a photo, or type the code by hand.': 'Escanéala, importa una foto o escribe el código a mano.',
'Scan': 'Escanear',
'Import photo': 'Importar foto',
'Label': 'Etiqueta',
'e.g. FitZone downtown': 'p. ej. FitZone centro',
'Code': 'Código',
'Membership number or code': 'Número de socio o código',
'Save card': 'Guardar tarjeta',
'Gym card': 'Tarjeta del gimnasio',
'Card added': 'Tarjeta añadida',
'Nothing to save yet': 'Nada que guardar todavía',
"That's not a QR code — only QR cards can be shown here": 'Eso no es un código QR — aquí solo se pueden mostrar tarjetas QR',
'No QR code found in that image': 'No se encontró ningún código QR en esa imagen',
'Could not read that image': 'No se pudo leer esa imagen',
'Camera permission is needed to scan. Enable it in Settings.': 'Se necesita permiso de cámara para escanear. Actívalo en Ajustes.',
'Scanning is not available on this device.': 'El escaneo no está disponible en este dispositivo.',
'Could not start the scanner': 'No se pudo iniciar el escáner',
}