Commit Graph
3 Commits
Author SHA1 Message Date
efiten fb34bd3725 android: the deployment card says step by step what to do
Three testers asked what to enter under Settings > Deployment. Until a deployment is chosen
the card now stands out (blue, title "First step: choose where your data goes") and lists
the steps: open your CoreScope on another screen, open Coverage, scan its QR code or type
the address under it. Once chosen it shrinks to one line naming where the app uploads.
2026-11-12 16:54:49 +01:00
efiten 734c0d0a8d android: scanning the deployment already in use no longer restarts the app
Choosing a deployment saves it and reloads the page, also when it is the one in use. On a
phone the QR scan of the same deployment dropped the companion link and cleared the debug
log. The same deployment now changes nothing; a different one asks first while connected.
2026-11-11 22:14:35 +01:00
efiten 65de1920f9 feat(native): choose the deployment at runtime instead of baking config.json into the APK
The APK carried the config.json that happened to be in public/ at build time, so
every APK belonged to one deployment, and a real one would have put the broker
login inside the file.

The native app now asks for the URL of a CoreDrive RX web deployment under
Settings and reads that deployment's config.json through CapacitorHttp, outside
the WebView, so the deployment needs no CORS header for it. A new URL is checked
before it replaces the old one. The last good config of the same deployment is
kept in localStorage and used when a start has no network; a different
deployment drops it. android:sync removes config.json from the APK assets.

- src/deployment.js: URL normalization (https only), fetch + validate + cache
- src/config.js: setConfigSource and parseConfigText, fetch path unchanged
- test/deployment.test.mjs: 11 tests (460 total pass)
- web build checked headless: appver filled, Deployment card hidden

Not tested on a device yet.
2026-11-10 09:04:56 +01:00