This commit is contained in:
Duarte Santos committed 2026-08-30 13:30:38 +02:00
commit a65287de0f
24 files changed
+136 -11

No files matched your search

+12 -2
View File
@@ -10,7 +10,7 @@ import { Thumb } from '../components/Media.jsx'
import { glyphPicker, exercisePicker, exConfigSheet, confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { glyphOf } from '../lib/glyphs.js'
import { Button, SelectRow } from '../components/ui.jsx'
import { Button, Row, SelectRow, Switch } from '../components/ui.jsx'
import { POLICIES_FOR, POLICY_NAME, POLICY_DESC } from '../lib/progression.js'
import BodyMap from '../components/BodyMap.jsx'
import { loadOfRoutine, rankOf, MUSCLE_NAME } from '../lib/muscles.js'
@@ -68,9 +68,19 @@ export default function RoutineEdit() {
<SelectRow icon="chartLine" title={t('Progression')} sheetTitle={t('Progression')}
value={r.prog || 'linear'} onChange={v => update(s => { s.routines.find(x => x.id === id).prog = v })}
options={POLICIES_FOR.reps.map(p => ({ value: p, label: t(POLICY_NAME[p]), subtitle: t(POLICY_DESC[p]) }))} />
<Row icon="pause" iconTint="var(--orange)" title={t('Exclude from automatic progression')}
subtitle={t('Use for planned deloads. Workouts stay in history and statistics.')}>
<Switch checked={r.excludeFromProgression === true} onChange={v => update(s => {
const routine = s.routines.find(x => x.id === id)
if (v) routine.excludeFromProgression = true
else delete routine.excludeFromProgression
})} />
</Row>
</div>
<div className="small dim" style={{ margin: '-10px 2px 16px' }}>
{t('Applies to every exercise in this routine that does not set its own rule.')}
{r.excludeFromProgression
? t('The next regular target continues from the last included workout.')
: t('Applies to every exercise in this routine that does not set its own rule.')}
</div>
{missingCount > 0 && <div className="card" style={{ marginBottom: 16, borderColor: 'var(--orange)' }}>