Bugfix-Runde vom Board: Coach-Speichern auf Android (#42), Baender wie Koerpergewicht (#39), Einheitenwechsel rechnet um (#22), Mitte-Tab im Workout (#29/#21), Kopie-Namen, Geister-Wochentag, Swap-Picker

- #42: "Save and use the Coach" blieb auf Android 16 grau. Der sichere Speicher wird jetzt mit
  4 s Timeout angesprochen (coach-secrets.js withTimeout), die Geraete-Einstellung wird VOR dem
  Schluessel geschrieben, und jeder Fehler landet als Toast statt in einem stummen Promise.
- #39: isBodyweightEq zaehlt 'band'/'resistance band' mit (54 Katalog-Uebungen) — ein Reps-Stepper,
  Progression in Wdh./Saetzen; der Bodyweight-Schalter je Uebung ueberstimmt weiterhin.
- #22: Settings → Gewichtseinheit fragt: Zahlen umrechnen (lib/units.js convertStateUnit ueber
  Saetze, Drops, topW, Ziele, inc, Warm-up-Configs, exWeights, barWeights, Koerpergewicht, Zielgewicht;
  lb auf 0.5, kg auf 0.25 gerundet, Hin- und Rueckweg stabil) oder nur die Beschriftung aendern.
  Fussnote entsprechend, alter Hinweis-String raus. 5 neue Strings in 14 Packs.
- #29/#21: der Mitte-Tab heisst auf dem Workout-Screen "Workout" und leuchtet; sonst "Resume",
  das zum gemerkten Eintrag (S.active.cur) fuehrt, der sich seit !92 nie von selbst bewegt.
- !85: Kopie einer Kopie wird "Name (Copy 2)", nicht "(Copy) (Copy)".
- !94: ein Wochentag, dessen Routine nicht mehr existiert, loest keine Bestaetigung aus.
- !72: das "+" im Swap-Picker uebernimmt sofort mit Standard-Config wie ueberall sonst.
This commit is contained in:
Duarte Santos committed 2026-09-05 13:58:07 +02:00
1 parent 3773f65355
commit b5769b9c38
25 files changed
+251 -34

No files matched your search

+10 -4
View File
@@ -111,11 +111,14 @@ const dayList = days => new Intl.ListFormat(dateLocale()).format(days.map(d => t
function StarterPlanChooser({ close }) {
const week = useStore(s => s.S.week)
const routines = useStore(s => s.S.routines)
const choose = (id, name) => {
const days = starterPlanDays(id)
close()
// A confirmation is only worth showing when one of those days is actually occupied.
if (!days.some(day => week[day])) { loadStarterPlan(id); return }
// A confirmation is only worth showing when one of those days is actually occupied — by a
// routine that still exists, not by a stale id the Plan already shows as "Rest".
const taken = day => week[day] && routines.some(r => r.id === week[day])
if (!days.some(taken)) { loadStarterPlan(id); return }
confirmSheet({
title: t('Load {0}?', name),
message: t('The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.', dayList(days)),
@@ -866,7 +869,10 @@ export function swapActiveWorkoutExercise(index) {
const active = S().active
if (!active?.entries?.[index]) return
const picker = exercisePicker(ex => exConfigSheet(ex, null, cfg => {
// The "+" on a picker row commits with the default config, exactly as it does in the add
// flows; tapping the row still opens the config sheet first.
const picker = exercisePicker((ex, quick) => quick ? swapTo(ex, defaultConfig(ex.id)) : exConfigSheet(ex, null, cfg => swapTo(ex, cfg), null, null))
function swapTo(ex, cfg) {
// The picker is a chooser here, not a stack you keep adding from: one swap, then back to
// the workout. (The add flow deliberately leaves it open.)
picker.close()
@@ -920,7 +926,7 @@ export function swapActiveWorkoutExercise(index) {
confirmText: t('Continue'),
onConfirm: () => apply({ loggedConfirmed: true })
})
}))
}
}
/* ============================ equipment profiles ============================ */