a90c8a9354
Battery nudge:
- lib/batteryPlan: project SoC through the planned stops using current
Tesla battery (or 80% default), 85% of rated range, and conservative
per-stop charge rates (Supercharger 1.5%/min, dest charger 0.4%/min).
- LegRow shows "arrive X%" plus a tone (red/amber/transparent) and a
TIGHT / WON'T REACH chip if the projected arrival is below 15%/5%.
- Top-of-itinerary banner when any leg is danger or warning, naming the
current SoC source (live Tesla vs assumed 80%).
PWA / offline:
- vite-plugin-pwa with autoUpdate strategy; ServiceWorker registered in
main.tsx (prod-only).
- Workbox cache strategies:
map tiles CacheFirst, 30 days, 800 entries
nominatim/OSRM NetworkFirst with cached fallback
/api/* NetworkFirst, short TTL, last response stays usable
- App shell precached so the planner renders offline; navigateFallback
ensures deep links serve index.html without a network round trip.
- manifest.webmanifest + theme-color + favicon.svg (replaces dead
/tesla-icon.svg reference). Installable to home screen.
- Sonner toasts on offline-ready and update-available.
19 lines
670 B
HTML
19 lines
670 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
<meta name="theme-color" content="#0a0a0c" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Tesla Trip Planner • Grok</title>
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
|
|
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
|
|
crossorigin="" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|