Files
kuentagym/frontend/src/main.jsx
T
Duarte Santos ee2be743b0 Standalone mobile app: Capacitor shells for iOS and Android
A second flavor of openGym (VITE_MOBILE=1) that runs entirely on the
phone: no account, no server, no sync. State is mirrored into a file in
the app's private storage (survives WebView storage eviction), the
workout-day reminder is a native local notification scheduled on planned
weekdays, and backups export through the OS share sheet. Exercise media
loads from the same CDN as the demo build. npm run build:mobile, then
Android Studio / Xcode — see docs/MOBILE.md. NOTICE.md gains an AGPL §7
app-store exception.
2026-07-23 15:14:36 +02:00

15 lines
487 B
React

import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.jsx'
import { MOBILE } from './lib/mobile.js'
import './index.css'
createRoot(document.getElementById('root')).render(
<StrictMode><App /></StrictMode>
)
// Not in the mobile build: the native shell already serves everything from disk.
if (!MOBILE && 'serviceWorker' in navigator && location.protocol === 'https:') {
navigator.serviceWorker.register('sw.js').catch(() => {})
}