feat: replace per-workout-type phase-detection settings with one global pair
The 14 phase-related profile columns (warmup/cooldown per workout type, plus an unused Interval pair) added more granularity than wanted. Migration 0006 drops all 14 and adds a single warmup_minutes/cooldown_minutes pair applied uniformly to every fixed-duration workout type; Interval still detects phases from lap data directly and ignores this setting. Restores a simplified Phase detection section in the Profile UI with just the two fields.
This commit is contained in:
@@ -146,6 +146,25 @@ export function Profile() {
|
||||
))}
|
||||
</fieldset>
|
||||
|
||||
<fieldset className="kind-editor">
|
||||
<legend>Phase detection</legend>
|
||||
<div className="controls">
|
||||
<NumberField
|
||||
label="Warm-up (minutes)"
|
||||
value={profile.WarmupMinutes}
|
||||
onChange={(v) => set("WarmupMinutes", v)}
|
||||
/>
|
||||
<NumberField
|
||||
label="Cool-down (minutes)"
|
||||
value={profile.CooldownMinutes}
|
||||
onChange={(v) => set("CooldownMinutes", v)}
|
||||
/>
|
||||
</div>
|
||||
<p className="empty-state">
|
||||
Applies to every workout type. Interval workouts detect warm-up/cool-down from lap data directly and don't use this setting.
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<button onClick={save}>Save</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -78,20 +78,8 @@ export interface Profile {
|
||||
HRZone4MaxPct: number;
|
||||
HRZone5MinPct: number;
|
||||
HRZone5MaxPct: number;
|
||||
EasyWarmupMinutes: number;
|
||||
EasyCooldownMinutes: number;
|
||||
LongWarmupMinutes: number;
|
||||
LongCooldownMinutes: number;
|
||||
TempoWarmupMinutes: number;
|
||||
TempoCooldownMinutes: number;
|
||||
Threshold30WarmupMinutes: number;
|
||||
Threshold30CooldownMinutes: number;
|
||||
Threshold60WarmupMinutes: number;
|
||||
Threshold60CooldownMinutes: number;
|
||||
MASTestWarmupMinutes: number;
|
||||
MASTestCooldownMinutes: number;
|
||||
IntervalWarmupMinutes: number;
|
||||
IntervalCooldownMinutes: number;
|
||||
WarmupMinutes: number;
|
||||
CooldownMinutes: number;
|
||||
CreatedAt: string;
|
||||
UpdatedAt: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user