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
Follow-up to #194: the ⋯ menu names a bar only for a bar exercise, so a plate-loaded machine set to per side with its own weight reads Per side, not Bar 50 lb
Duarte Santos8bdb875c19dc
diff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsxindex 12d91ee76..a7e4f0e3a 100644--- a/frontend/src/views/Workout.jsx+++ b/frontend/src/views/Workout.jsx@@ -300,9 +300,12 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSi})return out})()+ // Only a bar is named as one: a plate-loaded machine set to per side with its own weight is+ // not a "Bar 50 lb".const loadSummary = loadKind === 'none' ? t('Off'): loadKind === 'single' ? t('Single stack')- : base > 0 ? t('Bar {0}', fmtNum(base) + ' ' + S.unit) : usesBar(ex) ? t('No bar') : t('Per side')+ : !usesBar(ex) ? t('Per side')+ : base > 0 ? t('Bar {0}', fmtNum(base) + ' ' + S.unit) : t('No bar')// The line under a set row (or a drop sub-row): shown on the first loaded row and whenever the// stack changes from the loaded row before it, so a run of equal weights shows its plates once.// What to strip and what to add rides along, except in the compact view.diff --git a/frontend/src/views/Workout.plates.test.jsx b/frontend/src/views/Workout.plates.test.jsxindex 6e78468fc..c8eaddf91 100644--- a/frontend/src/views/Workout.plates.test.jsx+++ b/frontend/src/views/Workout.plates.test.jsx@@ -176,6 +176,24 @@ describe('plate line under set rows', () => {act(() => sr.unmount()); sc.remove()})+ it('the ⋯ menu names a bar only for a bar: a machine loaded per side with its own weight reads Per side', () => {+ const MACHINE = Object.values(EXIDX).find(e => e.eq === 'leverage machine').id+ mount([entry(MACHINE, [work(145)], { w: 145 })], {+ loadKind: { [MACHINE]: { kind: 'pairs', _ts: 1 } }, barWeights: { [MACHINE]: 50 },+ })+ expect(lines()).toEqual([{ text: '45 + 2.5 per side', moves: null }])+ const more = [...container.querySelectorAll('button')].find(b => (b.getAttribute('aria-label') || b.title || '') === 'More' && !b.classList.contains('n'))+ act(() => more.click())+ const sc = document.createElement('div')+ document.body.appendChild(sc)+ const sr = createRoot(sc)+ act(() => sr.render(useUI.getState().sheets.at(-1).render(() => {})))+ const item = [...sc.querySelectorAll('.menu-item')].find(b => b.textContent.includes('Plate loading'))+ expect(item.textContent).toContain('Per side')+ expect(item.textContent).not.toContain('Bar')+ act(() => sr.unmount()); sc.remove()+ })+it('a saved workout being corrected (#203) has no plate line and no Plate loading in its menu', () => {mount([entry(SQUAT, [warm(95), work(145)], { w: 145 })])expect(lines().length).toBe(2)