feat: add passkey-style online profiles for cross-device sync and show build time in About

This commit is contained in:
Jonathan Sykes
2026-07-03 05:16:05 +08:00
parent 048817bcf4
commit 94140a5433
5 changed files with 379 additions and 8 deletions

View File

@@ -46,6 +46,11 @@ The PWA is what runs in production; `legacy/` holds the old native-only docs.
- **A-B loop markers are per-song-per-playlist**: stored on the playlist's own
copy of the video (`entry.ab = {a, b}`) when playback source is that playlist;
`data.abMarkers[videoId]` is only the fallback for non-playlist playback.
- **Online profiles** (`profiles` table, `/api/profile/*`): named cross-device
sync where the lowercase profile NAME is the only credential (passkey-style,
by design). Client stores `data.profile = {name, syncedAt}`; sync is
last-write-wins — push debounced on every persist(), pull on app launch when
the server's `updated_at` is newer than the local `syncedAt`.
## Testing
- Unit: `node --test frontend/` (sw, sw-update, async-guard).