feat: isolate planned deloads from progression
This commit is contained in:
1 parent
5314b342ff
commit
26579e4261
25 files changed
+137
-12
No files matched your search
@@ -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'
|
||||
@@ -58,9 +58,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)' }}>
|
||||
|
||||
Reference in new issue
Block a user