Gym check-in in the browser/PWA too
The feature was gated behind MOBILE because scanning went through the native ML Kit plugin. iPhone users only have the PWA, so: route, Home card and Settings switch on every platform; photo import and a live camera sheet decode in the browser with BarcodeDetector where it exists and jsQR (Apache-2.0, lazy chunk) otherwise. The app build keeps ML Kit. Round-trip test lean-qr -> jsQR.
This commit is contained in:
1 parent
0af9f55528
commit
aa487d29f4
30 files changed
+315
-47
No files matched your search
@@ -5,7 +5,6 @@ import { useUI } from './store/useUI.js'
|
||||
import { bindUI } from './components/ui.jsx'
|
||||
import { ACCENTS } from './lib/format.js'
|
||||
import { setLang, useLang } from './lib/i18n.js'
|
||||
import { MOBILE } from './lib/mobile.js'
|
||||
import { setNav } from './lib/nav.js'
|
||||
import { initBackButton } from './lib/back.js'
|
||||
import { useWakeLock } from './lib/wakelock.js'
|
||||
@@ -115,10 +114,9 @@ function Shell() {
|
||||
{!authed ? <Login /> : needsMobileOnboarding ? <MobileOnboarding /> : (
|
||||
<Routes>
|
||||
<Route path="/home" element={<Home />} />
|
||||
{/* Gym check-in is mobile-only — it needs the native scanner and showing a QR to
|
||||
a turnstile makes no sense in a browser tab. Off mobile (or switched off in
|
||||
Settings) the route falls through to the catch-all redirect below. */}
|
||||
{MOBILE && S.checkIn !== false && <Route path="/checkin" element={<CheckIn />} />}
|
||||
{/* Gym check-in — switched off in Settings, the route falls through to the
|
||||
catch-all redirect below. */}
|
||||
{S.checkIn !== false && <Route path="/checkin" element={<CheckIn />} />}
|
||||
<Route path="/plan" element={<Plan />} />
|
||||
<Route path="/plan/r/:id" element={<RoutineEdit />} />
|
||||
<Route path="/workout" element={<Workout />} />
|
||||
|
||||
Reference in new issue
Block a user