From b65a30591c51691e64556816b272d09f62af3af0 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Tue, 7 Apr 2026 20:19:31 +0200 Subject: [PATCH] feat: show exercise weights in template preview and quick start Template detail modal now shows the initial weight per exercise. Quick start hero shows the first exercise name and weight to help with rack preparation before starting. --- package.json | 2 +- .../[workout=fitnessWorkout]/+page.svelte | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e352094..2a132f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.5.1", + "version": "1.5.2", "private": true, "type": "module", "scripts": { diff --git a/src/routes/fitness/[workout=fitnessWorkout]/+page.svelte b/src/routes/fitness/[workout=fitnessWorkout]/+page.svelte index 568daff..2fa053e 100644 --- a/src/routes/fitness/[workout=fitnessWorkout]/+page.svelte +++ b/src/routes/fitness/[workout=fitnessWorkout]/+page.svelte @@ -374,7 +374,15 @@ {/if} {:else} - {nextTemplate.exercises.length} {nextTemplate.exercises.length !== 1 ? t('exercises_word', lang) : t('exercise', lang)} + {@const firstEx = nextTemplate.exercises[0]} + {@const firstExData = firstEx ? getExerciseById(firstEx.exerciseId, lang) : null} + {@const firstExWeight = firstEx?.sets.find((/** @type {any} */ s) => s.weight != null)?.weight} + + {nextTemplate.exercises.length} {nextTemplate.exercises.length !== 1 ? t('exercises_word', lang) : t('exercise', lang)} + {#if firstExData} + · {lang === 'en' ? 'starts with' : 'beginnt mit'} {firstExData.localName} {#if firstExWeight != null}({firstExWeight} kg){/if} + {/if} + {/if}
@@ -469,9 +477,12 @@ @@ -937,7 +948,7 @@ .tex-name { font-weight: 600; } - .tex-sets { + .tex-meta { color: var(--color-text-secondary); } .modal-meta {