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.
This commit is contained in:
1 parent
389315625c
commit
ee2be743b0
92 files changed
+3117
-29
No files matched your search
@@ -1,12 +1,14 @@
|
||||
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>
|
||||
)
|
||||
|
||||
if ('serviceWorker' in navigator && location.protocol === 'https:') {
|
||||
// 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(() => {})
|
||||
}
|
||||
Reference in new issue
Block a user