From 29763ffaa9869ed73e382e4f2623e0d5b5afcb9e Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 30 Mar 2026 13:24:52 +0200 Subject: [PATCH] fitness: GPS workout templates with interval pre-selection Enable creating templates for GPS-tracked workouts with activity type and optional interval training. GPS templates show activity/interval info instead of exercise lists in cards, modals, and schedule. Starting a GPS template pre-selects the interval and jumps to the map screen. --- .../components/fitness/TemplateCard.svelte | 34 ++- src/lib/js/workout.svelte.ts | 28 ++ src/lib/js/workoutSync.svelte.ts | 4 + src/models/WorkoutTemplate.ts | 21 +- src/routes/api/fitness/templates/+server.ts | 24 +- .../api/fitness/templates/[id]/+server.ts | 27 +- .../[workout=fitnessWorkout]/+page.svelte | 280 ++++++++++++++++-- .../[active=fitnessActive]/+page.svelte | 16 +- 8 files changed, 382 insertions(+), 52 deletions(-) diff --git a/src/lib/components/fitness/TemplateCard.svelte b/src/lib/components/fitness/TemplateCard.svelte index ee5f4da..5dd4da0 100644 --- a/src/lib/components/fitness/TemplateCard.svelte +++ b/src/lib/components/fitness/TemplateCard.svelte @@ -1,6 +1,6 @@