thermograph/static
Emi Griffith 487c1a6ee4 Fix the hero's "Use my location" doing nothing (#179)
The button was dead on plain HTTP and failed silently everywhere.

Browsers only expose geolocation on secure origins, but `navigator.geolocation`
still EXISTS on http:// — getCurrentPosition just fails with a permission error
("Only secure origins are allowed"). The guard was `if (!navigator.geolocation)
return;`, which passes on http://, so the call went ahead, errored, and landed
in an empty error callback. Nothing happened at all.

`make lan-run` serves plain HTTP on 0.0.0.0:8137 so phones can reach it, so the
button could never work in the normal dev-and-phone workflow, and gave no hint
why. It would have worked on thermograph.org, which is HTTPS.

- Gate on `window.isSecureContext`, not just the API's presence. Where the
  browser will refuse, hide the locate button and promote "Pick on the map" to
  primary rather than offering a control that cannot work.
- Report failures: a declined prompt, a timeout, and an unavailable fix each get
  their own message in an aria-live slot. A silent failure is indistinguishable
  from a broken button, which is exactly how this went unnoticed.
- Show a "Locating…" state while the fix is pending; it can take seconds.

To exercise geolocation against the LAN dev server, serve it over TLS:
`make lan-run TLS=1` (self-signed cert into certs/).

Verified by driving the button in a real browser across all three cases:
insecure origin (button hidden, map promoted), permission granted (hero
re-points at the located place), permission denied (message shown, button
restored).
2026-07-18 07:48:17 +00:00
..
account.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00
app.js Fix the hero's "Use my location" doing nothing (#179) 2026-07-18 07:48:17 +00:00
apple-touch-icon.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
cache.js Warm neighbor cells server-side (/cell?neighbors=1) (#51) 2026-07-11 20:47:31 +00:00
calendar.html Declutter subpage headers; pin the mobile hamburger to the viewport (#176) 2026-07-18 06:09:59 +00:00
calendar.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
chart.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
climate.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00
compare.html Declutter subpage headers; pin the mobile hamburger to the viewport (#176) 2026-07-18 06:09:59 +00:00
compare.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
day.html Declutter subpage headers; pin the mobile hamburger to the viewport (#176) 2026-07-18 06:09:59 +00:00
day.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
digest.js Rebuild the homepage as a distribution landing; add an SMTP seam (#178) 2026-07-18 07:39:47 +00:00
favicon-16.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon-32.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon-48.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon.svg New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
filtersheet.js Compare basis inline; synced inline + sheet metric selector (both pages) (#82) 2026-07-12 07:45:12 +00:00
google03ab95daa090e8d9.html Add Google Search Console site-verification file (#128) 2026-07-16 18:56:42 +00:00
legend.html Declutter subpage headers; pin the mobile hamburger to the viewport (#176) 2026-07-18 06:09:59 +00:00
logo-192.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo-maskable-192.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo-maskable-512.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
manifest.webmanifest New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
mappicker.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
nav.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
package.json Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
push-client.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
shared.js Distribution bars: split the in-bar range into Max/Min rows (#84) 2026-07-12 18:32:38 +00:00
style.css Fix the hero's "Use my location" doing nothing (#179) 2026-07-18 07:48:17 +00:00
subscriptions.html Declutter subpage headers; pin the mobile hamburger to the viewport (#176) 2026-07-18 06:09:59 +00:00
subscriptions.js Push: surface delivery failures (no longer a silent success) (#157) 2026-07-17 00:12:14 +00:00
sw.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
units.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00