Goal
On /share/d/<npub> (driver share), restore the "Add to RoadFlare" primary CTA with an href pointing at roadflared:<npub>?name=<display-name>, so riders tapping the button on a device with RoadFlare iOS installed open straight into the Add Driver flow.
Context
The "Add to RoadFlare" button was removed from 404.html (which doubles as the SPA router for /share/d/<npub> and /share/r/<npub>) because its nostr:<npub> href didn't actually open RoadFlare — the app doesn't register any URL scheme today. See the earlier removal PR for context.
We're restoring the button only on driver shares, using a custom scheme (roadflared:) that RoadFlare iOS will claim once variablefate/roadflare-ios#64 ships in an App Store release.
A separate issue/PR tracks the rider-share equivalent with roadflarer: (handled by a future driver-side iOS app).
Blocking on
Changes
404.html:
- Re-add an
<a> element with id="add-driver-btn", class btn btn-primary, initially hidden, label "Add to RoadFlare", placed above .store-buttons inside .actions.
- In
renderSharePage, when isDriver === true, set add-driver-btn.href = 'roadflared:' + npub + (name ? '?name=' + encodeURIComponent(name) : '') and hidden = false.
How to merge
Keep this PR as a draft until the matching iOS App Store build is live. Then rebase on latest main, mark ready, merge. GitHub Pages deploys on merge.
Goal
On
/share/d/<npub>(driver share), restore the "Add to RoadFlare" primary CTA with anhrefpointing atroadflared:<npub>?name=<display-name>, so riders tapping the button on a device with RoadFlare iOS installed open straight into the Add Driver flow.Context
The "Add to RoadFlare" button was removed from
404.html(which doubles as the SPA router for/share/d/<npub>and/share/r/<npub>) because itsnostr:<npub>href didn't actually open RoadFlare — the app doesn't register any URL scheme today. See the earlier removal PR for context.We're restoring the button only on driver shares, using a custom scheme (
roadflared:) that RoadFlare iOS will claim once variablefate/roadflare-ios#64 ships in an App Store release.A separate issue/PR tracks the rider-share equivalent with
roadflarer:(handled by a future driver-side iOS app).Blocking on
roadflare-ioswithroadflared:URL scheme support (tracked by variablefate/roadflare-ios#64).Changes
404.html:<a>element withid="add-driver-btn", classbtn btn-primary, initiallyhidden, label "Add to RoadFlare", placed above.store-buttonsinside.actions.renderSharePage, whenisDriver === true, setadd-driver-btn.href = 'roadflared:' + npub + (name ? '?name=' + encodeURIComponent(name) : '')andhidden = false.How to merge
Keep this PR as a draft until the matching iOS App Store build is live. Then rebase on latest
main, mark ready, merge. GitHub Pages deploys on merge.