Log flights offline: the form is kept by the service worker, flights queue on the device (IndexedDB) and send when back online; one-time keys prevent duplicates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 21:13:59 -05:00
1 parent 08ba017c7e
commit 191eb030e8
14 files changed
+314 -14

No files matched your search

+2 -2
View File
@@ -70,7 +70,7 @@ For domain-level forward auth, Authentik matches each line as a regular expressi
```
^https://aircraft\.example\.com/manifest\.json$
^https://aircraft\.example\.com/service-worker\.js$
^https://aircraft\.example\.com/offline\.html$
^https://aircraft\.example\.com/offline\.(html|js)$
^https://aircraft\.example\.com/favicon\.svg$
^https://aircraft\.example\.com/icon(-192|-maskable)?\.(png|svg)$
^https://aircraft\.example\.com/apple-touch-icon\.png$
@@ -89,7 +89,7 @@ What each group is for:
| Lines | Needed for | What's exposed |
|---|---|---|
| `manifest.json`, `service-worker.js`, `offline.html`, icons | Installing the app on a phone (the browser fetches these without cookies), and share pages | Static files with no data |
| `manifest.json`, `service-worker.js`, `offline.html`, `offline.js`, icons | Installing the app on a phone (the browser fetches these without cookies), and share pages | Static files with no data |
| `/assets/…` | Styles and scripts for share pages and the signing pages | Static files with no data |
| `/shared/<token>`, `/shared/<token>/report` | Read-only share links (Access & Sharing) | Only with a valid, unexpired, unrevoked 32-character token, and only what that link's level shows |
| `/rails/active_storage/blobs/redirect/…`, `/rails/active_storage/disk/…` | The aircraft picture and shared documents on share pages | A file only to someone holding its signed link (from a page they could see). Disk links expire after a few minutes; redirect links don't, so a forwarded link keeps working |
+6
View File
@@ -11,6 +11,12 @@ Every hour flown is added to the aircraft and to each installed component, which
- The route (From/To airports autocomplete) and notes.
- Optionally a **track log** (GPX, KML or CSV) and **engine monitor data** (CGR-30P / CGR-30C `.csv`), which you can chart on the flight's page.
### With no signal
On a phone or tablet with the app installed (see [Getting started](getting-started.md)), you can log a flight without a connection, as long as you've opened **Log Flight** for that aircraft on that device before. Without signal, the form opens from the copy the device kept, and **Log Flight** saves the flight on the device instead of sending it. The next leg starts where the last one ended. When the connection is back, the app sends the saved flights by itself and says so at the top of the page. A flight that's rejected (for example a typo in the tach) stays there with the reason, to log again by hand or discard. Sending twice never logs a flight twice.
Track and engine data files attached offline are kept and sent too.
## Update hours
When you don't log each flight, use **Update Hours** on the overview: enter the current meter readings and the difference is applied to every installed component. A reading lower than the current one is treated as a correction.