Explore: personal GPS heatmap tab under Athlete page

- bincio/explore.py: bake_tracks() simplifies GPS coords (RDP ε=0.0001),
  strips to [lng,lat], groups by sport type, writes per-handle tracks.json
- bake-tracks CLI command; render CLI calls _bake_tracks() after each build;
  strava_zip runs it once at end of batch
- /api/me/tracks endpoint serves the baked file; wipe_user cleans it up
- Explore.svelte: MapLibre full-screen map with sidebar — type pills,
  year/month date filter, Lines / Heatmap (global or by-type) view modes
- AthleteView: Explore tab visible only to profile owner (checks __bincioMe)
- Base.astro: fullscreen prop + Planner nav link
This commit is contained in:
Davide Scaini
2026-05-14 14:31:21 +02:00
parent 2daa66d7b0
commit 5307ae287c
10 changed files with 607 additions and 10 deletions
+12 -4
View File
@@ -7,8 +7,10 @@ interface Props {
description?: string;
/** Set true on pages that must remain accessible without auth (login, register). */
public?: boolean;
/** Remove the content wrapper so a child can fill the remaining viewport. */
fullscreen?: boolean;
}
const { title = 'BincioActivity', description = 'Your personal activity stats', public: isPublicPage = false } = Astro.props;
const { title = 'BincioActivity', description = 'Your personal activity stats', public: isPublicPage = false, fullscreen = false } = Astro.props;
const editUrl = import.meta.env.PUBLIC_EDIT_URL ?? '';
const wikiUrl = import.meta.env.PUBLIC_WIKI_URL ?? '';
const plannerUrl = import.meta.env.PUBLIC_PLANNER_URL ?? '';
@@ -547,9 +549,15 @@ try {
</div>
)}
<main class="max-w-7xl mx-auto px-4 py-6">
<slot />
</main>
{fullscreen ? (
<main style="height:calc(100vh - 3rem);overflow:hidden">
<slot />
</main>
) : (
<main class="max-w-7xl mx-auto px-4 py-6">
<slot />
</main>
)}
<script>
// Register service worker for local activity storage (offline support)