mobile: modo "conectar a mi servidor" (emparejamiento por codigo, sin passkeys)
La app movil puede ahora sincronizar de verdad contra un servidor openGym propio en vez de guardar todo solo en el telefono. Como las passkeys no funcionan desde el WebView de la app (su origen nunca coincide con el hostname real), el emparejamiento se hace con un codigo de un solo uso generado desde una sesion ya logueada en el navegador (Ajustes > "Emparejar la app movil"), canjeado por un bearer token con la misma firma que ya usa la cookie de sesion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec84f6db06
commit
781e2441ba
22 files changed
+662
-29
No files matched your search
@@ -16,6 +16,7 @@ import Modals from './components/Modals.jsx'
|
||||
import Toast from './components/Toast.jsx'
|
||||
import RestTimer from './components/RestTimer.jsx'
|
||||
import Login from './views/Login.jsx'
|
||||
import MobileOnboarding from './views/MobileOnboarding.jsx'
|
||||
import Home from './views/Home.jsx'
|
||||
import Plan from './views/Plan.jsx'
|
||||
import RoutineEdit from './views/RoutineEdit.jsx'
|
||||
@@ -46,6 +47,7 @@ function Shell() {
|
||||
const loc = useLocation()
|
||||
const { S, user, ready } = useStore()
|
||||
const isGuest = useStore(s => s.isGuest())
|
||||
const needsMobileOnboarding = useStore(s => s.needsMobileOnboarding)
|
||||
const langV = useLang() // re-renders the whole shell when the language (pack) changes
|
||||
useEffect(() => { setNav(navigate) }, [navigate])
|
||||
useEffect(() => { applyPrefs(S.theme, S.accent) }, [S.theme, S.accent])
|
||||
@@ -81,7 +83,7 @@ function Shell() {
|
||||
re-mounts the boundary, so the tab bar is always a way out */}
|
||||
<div id="app" className="vfade" key={loc.pathname}>
|
||||
<ErrorBoundary>
|
||||
{!authed ? <Login /> : (
|
||||
{!authed ? <Login /> : needsMobileOnboarding ? <MobileOnboarding /> : (
|
||||
<Routes>
|
||||
<Route path="/home" element={<Home />} />
|
||||
<Route path="/plan" element={<Plan />} />
|
||||
|
||||
Reference in new issue
Block a user