Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Merge !100: feat(workout): add a "compact" layout and a per-session ⋮ switcher
Duarte Santos6b2eb4a79787
diff --cc frontend/src/lib/pt-br-locale.test.jsindex d4c90a9c1,fa35e2e54..55f157274--- a/frontend/src/lib/pt-br-locale.test.js+++ b/frontend/src/lib/pt-br-locale.test.js@@@ -27,11 -27,11 +27,11 @@@ describe('Brazilian Portuguese locale'.sort(byCodeUnit)const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(626)- expect(inherited).toHaveLength(614)+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(631)- expect(inherited).toHaveLength(623)++ expect(inherited).toHaveLength(624)// If this fails, review the changed keys and wording before accepting a new hash. From// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('2821033f44c026c1c78af6a539fb593e787dd442f939588d73f20e2ae32a2da8')- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('b7e4e1f39100061735da0725188e593ce56ac080696eb32a71a38b03223a2fd6')++ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('648111fcbd54b6d76410830ad2494cbdc03e2edcfb787e377217183183754e15')})test('does not leak European Portuguese UI terms', () => {diff --cc frontend/src/views/Workout.jsxindex 1d7ae0ee9,dcae25aa9..2d8db6f9b--- a/frontend/src/views/Workout.jsx+++ b/frontend/src/views/Workout.jsx@@@ -65,7 -65,11 +65,11 @@@ function Elapsed({ start })}/* ---------- one exercise block (reps: weight×reps · time: a held duration · cardio: duration+speed) ---------- */- function ExerciseBlock({ entryIdx, compact, onToggle, onToggleSide, onField, onAddSet, onRemoveSet, onAddWarmup, onRemoveSetAt, onStartTimed, onPairPrev, onPairNext, onSetRowRef, onProgressionSettings, onSwap, onMoveUp, onMoveDown, canMoveUp, canMoveDown, onRemoveExercise, busy }) {+ // `compact` shrinks the block for a superset member; `dense` (compact view) goes further and+ // drops everything that is not a set you are logging — media, tag chips, the note lines, the+ // "last time" recap and the progression line — leaving the name, the ⋯ menu and the sets.+ // Nothing dropped is lost: it is all still on the ⋯ menu, or one ⋮ switch back to list/cards.-function ExerciseBlock({ entryIdx, compact, dense, onToggle, onField, onAddSet, onRemoveSet, onAddWarmup, onRemoveSetAt, onStartTimed, onPairPrev, onPairNext, onSetRowRef, onProgressionSettings, onSwap, onMoveUp, onMoveDown, canMoveUp, canMoveDown, onRemoveExercise, busy }) {++function ExerciseBlock({ entryIdx, compact, dense, onToggle, onToggleSide, onField, onAddSet, onRemoveSet, onAddWarmup, onRemoveSetAt, onStartTimed, onPairPrev, onPairNext, onSetRowRef, onProgressionSettings, onSwap, onMoveUp, onMoveDown, canMoveUp, canMoveDown, onRemoveExercise, busy }) {const S = useStore(s => s.S)const update = useStore(s => s.update)const working = useUI(s => s.work)@@@ -358,12 -259,14 +362,15 @@@{onPairPrev && <Button size="xs" variant="tinted" icon="link" title={t('Make superset with previous')} onClick={onPairPrev}>{t('Make superset with previous')}</Button>}{onPairNext && <Button size="xs" variant="tinted" icon="link" title={t('Make superset with next')} onClick={onPairNext}>{t('Make superset with next')}</Button>}</div>}+ {/* compact view drops everything from here to the sets card — it is all still on the ⋯ menu+ (note, details, history, bar weight, progression) or is display-only (tags, "last time"). */}+ {!dense && <><div className="row" style={{ gap: 6, flexWrap: 'wrap', marginBottom: 8 }}>{cardio && <span className="tag acc"><Icon name="figureRun" />{t('Cardio')}</span>}- {/* You log the total; this is the split, so the set in front of you is unambiguous- without the rep count having to mean two different things (issue #31). */}- {!cardio && !timed && isPerSide(cfg) && <span className="tag acc nocap"><Icon name="shuffle" />{t('{0} per side', fmtNum(sideReps(entry.sets.find(s => !s.done)?.r ?? entry.sets[0]?.r)))}</span>}+ {/* A unilateral exercise is logged per side directly (the L/R rows below), so the old+ "{n} per side" chip — which halved the combined total for display — is gone: the split+ is no longer derived, it is what you enter. The tag only flags that this is per-side. */}+ {!cardio && !timed && isPerSide(cfg) && <span className="tag acc nocap"><Icon name="shuffle" />{t('Per side')}</span>}{(ex.tg || ex.bp) && <span className="tag">{t(ex.tg || ex.bp)}</span>}{ex.eq && <span className="tag">{t(ex.eq)}</span>}{best > 0 && <span className="tag nocap">{t('Best:')} {fmtNum(best)} {S.unit}</span>}