feat: persisted equipment profiles (Home/Gym/etc)
Builds on the existing session-only equipment filter (issue #6) by adding a persisted "what I actually own" profile, so the Library and exercise picker can default to what's usable at Home vs. at the Gym instead of the full catalogue every time. - New equipProfiles / activeEquipId / equipFilterOn on synced state (S) - lib/equipment.js: ALL_EQUIPMENT catalogue, activeProfile(), exAvailable() — body weight is always available regardless of profile - Settings: create/edit/delete profiles (name + equipment checklist), pick the active one, toggle filtering on/off - Library + exercise picker: filter to the active profile by default, with a one-tap "show all equipment" escape hatch per session - RoutineEdit: flags any saved exercise that needs equipment outside the active profile (inline warning icon + a summary banner), so you find out before showing up at the wrong location, not mid-workout Purely additive to synced client state — no server/API changes, no new dependencies. All 339 previously-passing tests still pass (the 7 failures in Workout.remove.test.jsx are pre-existing on a clean checkout too — a Node localStorage/vitest environment issue unrelated to this change).
This commit is contained in:
1 parent
f8024d344d
commit
d46b9215a3
7 files changed
+158
-7
No files matched your search
@@ -112,6 +112,7 @@ const P = {
|
||||
signOut: <><path d="M14.2 4.6H7a1.9 1.9 0 0 0-1.9 1.9v11a1.9 1.9 0 0 0 1.9 1.9h7.2" /><path d="m16.8 8.4 3.6 3.6-3.6 3.6M20.4 12H10.2" /></>,
|
||||
shuffle: <><path d="M3.6 7.2h2.9c1.6 0 2.8.9 3.8 2.4l3 4.8c1 1.5 2.2 2.4 3.8 2.4h2.9M3.6 16.8h2.9c1.6 0 2.8-.9 3.8-2.4l.7-1.1M15.6 9.9l.7-1.1c1-1.5 2.2-2.4 3.8-2.4h1.9" /><path d="m17.9 4.3 2.8 2.1-2.8 2.1M17.9 14.7l2.8 2.1-2.8 2.1" /></>,
|
||||
info: <><circle cx="12" cy="12" r="8.2" /><path d="M12 11v5.4" /><circle cx="12" cy="7.9" r=".9" fill="currentColor" stroke="none" /></>,
|
||||
warning: <><path d="M12 3.4 21.2 19.4H2.8Z" /><path d="M12 9.6v4.4" /><circle cx="12" cy="16.6" r=".9" fill="currentColor" stroke="none" /></>,
|
||||
}
|
||||
|
||||
// A few keys are aliases so call sites can say what they mean.
|
||||
|
||||
Reference in new issue
Block a user