@burdenoff/microfe-mybodyshield 2026.705.1 → 2026.705.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mybodyshield/components/DataTable.js +8 -4
- package/dist/mybodyshield/components/DataTable.js.map +1 -1
- package/dist/mybodyshield/components/EvidenceUpload.js +92 -4
- package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -0
- package/dist/mybodyshield/components/FileLink.js +35 -2
- package/dist/mybodyshield/components/FileLink.js.map +1 -0
- package/dist/mybodyshield/components/MybDiscussion.js +107 -6
- package/dist/mybodyshield/components/MybDiscussion.js.map +1 -0
- package/dist/mybodyshield/components/MybTags.js +148 -4
- package/dist/mybodyshield/components/MybTags.js.map +1 -0
- package/dist/mybodyshield/components/Pagination.js.map +1 -1
- package/dist/mybodyshield/components/UserSearchSelect.js +148 -0
- package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -0
- package/dist/mybodyshield/components/index.js +1 -0
- package/dist/mybodyshield/hooks/index.js +1 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +47 -27
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
- package/dist/mybodyshield/hooks/useMybComments.js +44 -2
- package/dist/mybodyshield/hooks/useMybComments.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybFiles.js +80 -3
- package/dist/mybodyshield/hooks/useMybFiles.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybTags.js +88 -2
- package/dist/mybodyshield/hooks/useMybTags.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybUsers.js +36 -0
- package/dist/mybodyshield/hooks/useMybUsers.js.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.js +41 -36
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.js +15 -9
- package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
- package/dist/mybodyshield/pages/coaching/CoachingPage.js +171 -147
- package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
- package/dist/mybodyshield/pages/goals/GoalsPage.js +0 -8
- package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +352 -278
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +600 -296
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.js +88 -51
- package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +146 -126
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.js +1 -4
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,12 +9,13 @@ import { IconChip as re } from "../_shared/visuals.js";
|
|
|
9
9
|
import "../../context/index.js";
|
|
10
10
|
import { useMybCompleteSession as ie, useMybLogSet as ae, useMybSession as oe } from "../../hooks/useMyBodyShieldApi.js";
|
|
11
11
|
import "../../hooks/index.js";
|
|
12
|
+
import { MybDiscussion as se } from "../../components/MybDiscussion.js";
|
|
12
13
|
import "../../components/index.js";
|
|
13
14
|
import { useMemo as u, useState as d } from "react";
|
|
14
|
-
import { ArrowLeft as
|
|
15
|
-
import { useParams as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { Button as
|
|
15
|
+
import { AlertTriangle as ce, ArrowLeft as le, CheckCircle2 as ue, Dumbbell as f, Flame as de, Gauge as fe, Plus as p, Ruler as pe, Timer as m, Weight as me } from "lucide-react";
|
|
16
|
+
import { useParams as he } from "react-router-dom";
|
|
17
|
+
import { Fragment as ge, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
18
|
+
import { Button as _, GlassCard as v, Input as y, Label as b, ResponsiveDialog as x, ResponsiveDialogContent as S, ResponsiveDialogDescription as C, ResponsiveDialogFooter as w, ResponsiveDialogHeader as T, ResponsiveDialogTitle as E, Switch as _e, Textarea as ve } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/mybodyshield/pages/train/SessionDetailPage.tsx
|
|
19
20
|
function D(e) {
|
|
20
21
|
let t = e.trim();
|
|
@@ -36,7 +37,7 @@ var O = {
|
|
|
36
37
|
notes: ""
|
|
37
38
|
};
|
|
38
39
|
function A() {
|
|
39
|
-
let { navigateTo: A } = e(), { id: j } =
|
|
40
|
+
let { navigateTo: A } = e(), { id: j } = he(), M = oe(j), N = ae(), P = ie(), [ye, F] = d(!1), [I, L] = d(O), [R, z] = d(null), [be, B] = d(!1), [V, H] = d(k), [U, W] = d(null), G = M.data, K = u(() => G?.sets ?? [], [G?.sets]), q = u(() => {
|
|
40
41
|
let e = /* @__PURE__ */ new Map();
|
|
41
42
|
for (let t of K) {
|
|
42
43
|
let n = e.get(t.exerciseName) ?? [];
|
|
@@ -46,25 +47,25 @@ function A() {
|
|
|
46
47
|
name: e,
|
|
47
48
|
sets: t.slice().sort((e, t) => e.setNumber - t.setNumber)
|
|
48
49
|
}));
|
|
49
|
-
}, [K]),
|
|
50
|
+
}, [K]), xe = u(() => K.reduce((e, t) => e + t.reps * t.weight, 0), [K]), J = G?.startedAt, Y = G?.completedAt, X = u(() => {
|
|
50
51
|
if (!J || !Y) return;
|
|
51
52
|
let e = new Date(J).getTime(), t = new Date(Y).getTime();
|
|
52
53
|
if (!(!Number.isFinite(e) || !Number.isFinite(t) || t < e)) return (t - e) / 1e3;
|
|
53
54
|
}, [J, Y]);
|
|
54
|
-
if (!j) return /* @__PURE__ */
|
|
55
|
+
if (!j) return /* @__PURE__ */ h(t, {
|
|
55
56
|
title: "Workout session",
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ h(l, {
|
|
57
58
|
message: "No session was specified.",
|
|
58
59
|
onRetry: () => A("train")
|
|
59
60
|
})
|
|
60
61
|
});
|
|
61
|
-
if (M.isLoading) return /* @__PURE__ */
|
|
62
|
+
if (M.isLoading) return /* @__PURE__ */ h(t, {
|
|
62
63
|
title: "Workout session",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ h(te, { label: "Loading session…" })
|
|
64
65
|
});
|
|
65
|
-
if (M.isError || !G) return /* @__PURE__ */
|
|
66
|
+
if (M.isError || !G) return /* @__PURE__ */ h(t, {
|
|
66
67
|
title: "Workout session",
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ h(l, {
|
|
68
69
|
title: "Session not found",
|
|
69
70
|
message: "This workout session may have been removed, or you don't have access to it.",
|
|
70
71
|
onRetry: () => M.refetch()
|
|
@@ -73,160 +74,160 @@ function A() {
|
|
|
73
74
|
let Z = G.status === "IN_PROGRESS", Q = G.completedAt ? `Completed ${s(G.completedAt)}` : G.startedAt ? `Started ${s(G.startedAt)}` : G.scheduledFor ? `Scheduled ${s(G.scheduledFor)}` : `Created ${s(G.createdAt)}`, $ = () => {
|
|
74
75
|
L(O), z(null), F(!0);
|
|
75
76
|
};
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ g(t, {
|
|
77
78
|
title: "Workout session",
|
|
78
79
|
description: Q,
|
|
79
|
-
actions: Z ? /* @__PURE__ */
|
|
80
|
+
actions: Z ? /* @__PURE__ */ g(ge, { children: [/* @__PURE__ */ g(_, {
|
|
80
81
|
variant: "outline",
|
|
81
82
|
onClick: $,
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
}), /* @__PURE__ */ _
|
|
83
|
+
children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), " Log set"]
|
|
84
|
+
}), /* @__PURE__ */ g(_, {
|
|
84
85
|
onClick: () => {
|
|
85
86
|
H(k), W(null), B(!0);
|
|
86
87
|
},
|
|
87
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ h(ue, { className: "h-4 w-4" }), " Complete"]
|
|
88
89
|
})] }) : void 0,
|
|
89
90
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ g("button", {
|
|
91
92
|
type: "button",
|
|
92
93
|
onClick: () => A("train"),
|
|
93
94
|
className: "mb-4 inline-flex items-center gap-1.5 text-sm font-medium text-text-secondary hover:text-text-primary",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ h(le, { className: "h-4 w-4" }), " Back to sessions"]
|
|
95
96
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ g(v, {
|
|
97
98
|
treatment: "glass",
|
|
98
99
|
className: "p-6",
|
|
99
100
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ h("div", {
|
|
101
102
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ g("div", {
|
|
103
104
|
className: "flex items-center gap-3",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
-
icon:
|
|
105
|
+
children: [/* @__PURE__ */ h(re, {
|
|
106
|
+
icon: h(Z ? de : f, { className: "h-5 w-5" }),
|
|
106
107
|
tint: Z ? "var(--color-accent-teal)" : "var(--color-accent-primary)"
|
|
107
|
-
}), /* @__PURE__ */
|
|
108
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
|
|
108
109
|
className: "flex items-center gap-2",
|
|
109
|
-
children: /* @__PURE__ */
|
|
110
|
-
}), /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ h(c, { status: G.status })
|
|
111
|
+
}), /* @__PURE__ */ h("p", {
|
|
111
112
|
className: "mt-1 text-sm text-text-secondary",
|
|
112
113
|
children: Q
|
|
113
114
|
})] })]
|
|
114
115
|
})
|
|
115
116
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ g("div", {
|
|
117
118
|
className: "mt-5 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
118
119
|
children: [
|
|
119
|
-
G.scheduledFor && /* @__PURE__ */
|
|
120
|
+
G.scheduledFor && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
120
121
|
className: "text-xs text-text-tertiary",
|
|
121
122
|
children: "Scheduled for"
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ h("p", {
|
|
123
124
|
className: "mt-0.5 text-sm font-medium text-text-primary",
|
|
124
125
|
children: r(G.scheduledFor)
|
|
125
126
|
})] }),
|
|
126
|
-
G.startedAt && /* @__PURE__ */
|
|
127
|
+
G.startedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
127
128
|
className: "text-xs text-text-tertiary",
|
|
128
129
|
children: "Started"
|
|
129
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ h("p", {
|
|
130
131
|
className: "mt-0.5 text-sm font-medium text-text-primary",
|
|
131
132
|
children: r(G.startedAt)
|
|
132
133
|
})] }),
|
|
133
|
-
G.completedAt && /* @__PURE__ */
|
|
134
|
+
G.completedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
134
135
|
className: "text-xs text-text-tertiary",
|
|
135
136
|
children: "Completed"
|
|
136
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ h("p", {
|
|
137
138
|
className: "mt-0.5 text-sm font-medium text-text-primary",
|
|
138
139
|
children: r(G.completedAt)
|
|
139
140
|
})] }),
|
|
140
|
-
G.perceivedExertion != null && /* @__PURE__ */
|
|
141
|
+
G.perceivedExertion != null && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
141
142
|
className: "text-xs text-text-tertiary",
|
|
142
143
|
children: "Perceived exertion"
|
|
143
|
-
}), /* @__PURE__ */
|
|
144
|
+
}), /* @__PURE__ */ g("p", {
|
|
144
145
|
className: "mt-0.5 text-sm font-medium tabular-nums text-text-primary",
|
|
145
146
|
children: [G.perceivedExertion, "/10 RPE"]
|
|
146
147
|
})] }),
|
|
147
|
-
G.caloriesBurned > 0 && /* @__PURE__ */
|
|
148
|
+
G.caloriesBurned > 0 && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
148
149
|
className: "text-xs text-text-tertiary",
|
|
149
150
|
children: "Calories burned"
|
|
150
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ h("p", {
|
|
151
152
|
className: "mt-0.5 text-sm font-medium tabular-nums text-text-primary",
|
|
152
153
|
children: a(G.caloriesBurned)
|
|
153
154
|
})] })
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
G.notes && /* @__PURE__ */
|
|
157
|
+
G.notes && /* @__PURE__ */ g("div", {
|
|
157
158
|
className: "mt-5 rounded-xl bg-bg-sunken/60 p-4",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ h("p", {
|
|
159
160
|
className: "text-xs text-text-tertiary",
|
|
160
161
|
children: "Notes"
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ h("p", {
|
|
162
163
|
className: "mt-1 whitespace-pre-wrap text-sm text-text-secondary",
|
|
163
164
|
children: G.notes
|
|
164
165
|
})]
|
|
165
166
|
})
|
|
166
167
|
]
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ g("div", {
|
|
169
170
|
className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
icon: /* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ h(n, {
|
|
173
|
+
icon: /* @__PURE__ */ h(f, { className: "h-5 w-5" }),
|
|
173
174
|
value: o(K.length),
|
|
174
175
|
label: "Total sets"
|
|
175
176
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
icon: /* @__PURE__ */
|
|
178
|
-
value: `${o(
|
|
177
|
+
/* @__PURE__ */ h(n, {
|
|
178
|
+
icon: /* @__PURE__ */ h(me, { className: "h-5 w-5" }),
|
|
179
|
+
value: `${o(xe)} kg`,
|
|
179
180
|
label: "Total volume"
|
|
180
181
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
icon: /* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ h(n, {
|
|
183
|
+
icon: /* @__PURE__ */ h(m, { className: "h-5 w-5" }),
|
|
183
184
|
value: X == null ? "—" : i(X),
|
|
184
185
|
label: "Duration"
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
icon: /* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ h(n, {
|
|
188
|
+
icon: /* @__PURE__ */ h(de, { className: "h-5 w-5" }),
|
|
188
189
|
value: G.caloriesBurned > 0 ? a(G.caloriesBurned) : "—",
|
|
189
190
|
label: "Calories burned"
|
|
190
191
|
})
|
|
191
192
|
]
|
|
192
193
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ g("div", {
|
|
194
195
|
className: "mt-8",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ g("div", {
|
|
196
197
|
className: "mb-3 flex items-end justify-between gap-3",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
198
199
|
className: "text-base font-semibold text-text-primary",
|
|
199
200
|
children: "Logged sets"
|
|
200
|
-
}), /* @__PURE__ */
|
|
201
|
+
}), /* @__PURE__ */ h("p", {
|
|
201
202
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
202
203
|
children: "Every set recorded during this session, grouped by exercise."
|
|
203
|
-
})] }), Z && /* @__PURE__ */ _
|
|
204
|
+
})] }), Z && /* @__PURE__ */ g(_, {
|
|
204
205
|
variant: "outline",
|
|
205
206
|
size: "sm",
|
|
206
207
|
onClick: $,
|
|
207
208
|
className: "shrink-0",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), " Log set"]
|
|
209
210
|
})]
|
|
210
|
-
}), q.length === 0 ? /* @__PURE__ */
|
|
211
|
+
}), q.length === 0 ? /* @__PURE__ */ h(ne, {
|
|
211
212
|
illustration: "empty-data",
|
|
212
|
-
icon: /* @__PURE__ */
|
|
213
|
+
icon: /* @__PURE__ */ h(f, { className: "h-10 w-10" }),
|
|
213
214
|
title: "No sets logged yet",
|
|
214
215
|
description: Z ? "Log your first set to start tracking this workout." : "No sets were recorded for this session.",
|
|
215
|
-
action: Z ? /* @__PURE__ */ _
|
|
216
|
+
action: Z ? /* @__PURE__ */ g(_, {
|
|
216
217
|
onClick: $,
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), " Log set"]
|
|
218
219
|
}) : void 0
|
|
219
|
-
}) : /* @__PURE__ */
|
|
220
|
+
}) : /* @__PURE__ */ h("div", {
|
|
220
221
|
className: "space-y-4",
|
|
221
|
-
children: q.map((e) => /* @__PURE__ */
|
|
222
|
+
children: q.map((e) => /* @__PURE__ */ g(v, {
|
|
222
223
|
treatment: "plain",
|
|
223
224
|
className: "p-4",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ g("div", {
|
|
225
226
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
227
228
|
className: "text-sm font-semibold text-text-primary",
|
|
228
229
|
children: e.name
|
|
229
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ g("span", {
|
|
230
231
|
className: "text-xs tabular-nums text-text-tertiary",
|
|
231
232
|
children: [
|
|
232
233
|
o(e.sets.length),
|
|
@@ -234,15 +235,15 @@ function A() {
|
|
|
234
235
|
e.sets.length === 1 ? "set" : "sets"
|
|
235
236
|
]
|
|
236
237
|
})]
|
|
237
|
-
}), /* @__PURE__ */
|
|
238
|
+
}), /* @__PURE__ */ h("ul", {
|
|
238
239
|
className: "divide-y divide-border-seam",
|
|
239
240
|
children: e.sets.map((e) => {
|
|
240
241
|
let t = e.durationSec > 0 || e.distanceM > 0;
|
|
241
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ g("li", {
|
|
242
243
|
className: "flex flex-wrap items-center justify-between gap-2 py-2",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ g("div", {
|
|
244
245
|
className: "flex items-center gap-2",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ g("span", {
|
|
246
247
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
247
248
|
children: [
|
|
248
249
|
"Set ",
|
|
@@ -252,16 +253,16 @@ function A() {
|
|
|
252
253
|
" × ",
|
|
253
254
|
ee(e.weight)
|
|
254
255
|
]
|
|
255
|
-
}), e.isPersonalRecord && /* @__PURE__ */
|
|
256
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), e.isPersonalRecord && /* @__PURE__ */ h(c, { status: "PR" })]
|
|
257
|
+
}), /* @__PURE__ */ g("div", {
|
|
257
258
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
|
|
258
|
-
children: [t && e.durationSec > 0 && /* @__PURE__ */
|
|
259
|
+
children: [t && e.durationSec > 0 && /* @__PURE__ */ g("span", {
|
|
259
260
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
261
|
-
}), t && e.distanceM > 0 && /* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ h(m, { className: "h-3.5 w-3.5 text-accent" }), i(e.durationSec)]
|
|
262
|
+
}), t && e.distanceM > 0 && /* @__PURE__ */ g("span", {
|
|
262
263
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
263
264
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ h(pe, { className: "h-3.5 w-3.5 text-accent" }),
|
|
265
266
|
o(e.distanceM),
|
|
266
267
|
" m"
|
|
267
268
|
]
|
|
@@ -273,20 +274,29 @@ function A() {
|
|
|
273
274
|
}, e.name))
|
|
274
275
|
})]
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
|
|
277
|
+
/* @__PURE__ */ h("div", {
|
|
278
|
+
className: "mt-8",
|
|
279
|
+
children: /* @__PURE__ */ h(se, {
|
|
280
|
+
entityType: "mybodyshield-session",
|
|
281
|
+
entityId: G.id,
|
|
282
|
+
title: "Coach feedback",
|
|
283
|
+
description: "Discuss form, cues and this session's results with your coach and team."
|
|
284
|
+
})
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ h(x, {
|
|
287
|
+
open: ye,
|
|
278
288
|
onOpenChange: F,
|
|
279
|
-
children: /* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ g(S, { children: [
|
|
290
|
+
/* @__PURE__ */ g(T, { children: [/* @__PURE__ */ h(E, { children: "Log a set" }), /* @__PURE__ */ h(C, { children: "Record reps and load for strength work, or duration and distance for cardio. The dialog stays open so you can log sets back-to-back." })] }),
|
|
291
|
+
/* @__PURE__ */ g("div", {
|
|
282
292
|
className: "space-y-4 px-1",
|
|
283
293
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ g("div", {
|
|
285
295
|
className: "space-y-1.5",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ h(b, {
|
|
287
297
|
htmlFor: "myb-set-exercise",
|
|
288
298
|
children: "Exercise"
|
|
289
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ h(y, {
|
|
290
300
|
id: "myb-set-exercise",
|
|
291
301
|
value: I.exerciseName,
|
|
292
302
|
onChange: (e) => L((t) => ({
|
|
@@ -296,15 +306,15 @@ function A() {
|
|
|
296
306
|
placeholder: "e.g. Back Squat"
|
|
297
307
|
})]
|
|
298
308
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ g("div", {
|
|
300
310
|
className: "grid grid-cols-2 gap-3",
|
|
301
311
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ g("div", {
|
|
303
313
|
className: "space-y-1.5",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ h(b, {
|
|
305
315
|
htmlFor: "myb-set-number",
|
|
306
316
|
children: "Set number"
|
|
307
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ h(y, {
|
|
308
318
|
id: "myb-set-number",
|
|
309
319
|
type: "number",
|
|
310
320
|
inputMode: "numeric",
|
|
@@ -317,12 +327,12 @@ function A() {
|
|
|
317
327
|
placeholder: "1"
|
|
318
328
|
})]
|
|
319
329
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ g("div", {
|
|
321
331
|
className: "space-y-1.5",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ h(b, {
|
|
323
333
|
htmlFor: "myb-set-reps",
|
|
324
334
|
children: "Reps"
|
|
325
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ h(y, {
|
|
326
336
|
id: "myb-set-reps",
|
|
327
337
|
type: "number",
|
|
328
338
|
inputMode: "numeric",
|
|
@@ -335,12 +345,12 @@ function A() {
|
|
|
335
345
|
placeholder: "8"
|
|
336
346
|
})]
|
|
337
347
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ g("div", {
|
|
339
349
|
className: "space-y-1.5",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ h(b, {
|
|
341
351
|
htmlFor: "myb-set-weight",
|
|
342
352
|
children: "Weight (kg)"
|
|
343
|
-
}), /* @__PURE__ */
|
|
353
|
+
}), /* @__PURE__ */ h(y, {
|
|
344
354
|
id: "myb-set-weight",
|
|
345
355
|
type: "number",
|
|
346
356
|
inputMode: "decimal",
|
|
@@ -354,12 +364,12 @@ function A() {
|
|
|
354
364
|
placeholder: "60"
|
|
355
365
|
})]
|
|
356
366
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ g("div", {
|
|
358
368
|
className: "space-y-1.5",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ h(b, {
|
|
360
370
|
htmlFor: "myb-set-distance",
|
|
361
371
|
children: "Distance (m)"
|
|
362
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ h(y, {
|
|
363
373
|
id: "myb-set-distance",
|
|
364
374
|
type: "number",
|
|
365
375
|
inputMode: "numeric",
|
|
@@ -372,12 +382,12 @@ function A() {
|
|
|
372
382
|
placeholder: "Optional"
|
|
373
383
|
})]
|
|
374
384
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ g("div", {
|
|
376
386
|
className: "space-y-1.5",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ h(b, {
|
|
378
388
|
htmlFor: "myb-set-duration",
|
|
379
389
|
children: "Duration (sec)"
|
|
380
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ h(y, {
|
|
381
391
|
id: "myb-set-duration",
|
|
382
392
|
type: "number",
|
|
383
393
|
inputMode: "numeric",
|
|
@@ -392,19 +402,19 @@ function A() {
|
|
|
392
402
|
})
|
|
393
403
|
]
|
|
394
404
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ g("div", {
|
|
396
406
|
className: "flex items-center justify-between gap-3 rounded-xl bg-bg-sunken/60 p-3",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ g("div", {
|
|
398
408
|
className: "flex items-center gap-2",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ h(fe, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(b, {
|
|
400
410
|
htmlFor: "myb-set-pr",
|
|
401
411
|
className: "cursor-pointer",
|
|
402
412
|
children: "Personal record"
|
|
403
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ h("p", {
|
|
404
414
|
className: "text-xs text-text-tertiary",
|
|
405
415
|
children: "Flag this set as a new PR."
|
|
406
416
|
})] })]
|
|
407
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ h(_e, {
|
|
408
418
|
id: "myb-set-pr",
|
|
409
419
|
checked: I.isPersonalRecord,
|
|
410
420
|
onCheckedChange: (e) => L((t) => ({
|
|
@@ -413,17 +423,17 @@ function A() {
|
|
|
413
423
|
}))
|
|
414
424
|
})]
|
|
415
425
|
}),
|
|
416
|
-
R && /* @__PURE__ */
|
|
426
|
+
R && /* @__PURE__ */ h("p", {
|
|
417
427
|
className: "text-sm text-status-error-text",
|
|
418
428
|
children: R
|
|
419
429
|
})
|
|
420
430
|
]
|
|
421
431
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(_, {
|
|
423
433
|
variant: "outline",
|
|
424
434
|
onClick: () => F(!1),
|
|
425
435
|
children: "Done"
|
|
426
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ h(_, {
|
|
427
437
|
onClick: async () => {
|
|
428
438
|
z(null);
|
|
429
439
|
let e = I.exerciseName.trim();
|
|
@@ -456,22 +466,32 @@ function A() {
|
|
|
456
466
|
})] })
|
|
457
467
|
] })
|
|
458
468
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
open:
|
|
469
|
+
/* @__PURE__ */ h(x, {
|
|
470
|
+
open: be,
|
|
461
471
|
onOpenChange: B,
|
|
462
|
-
children: /* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ g(S, { children: [
|
|
473
|
+
/* @__PURE__ */ g(T, { children: [/* @__PURE__ */ h(E, { children: "Complete session" }), /* @__PURE__ */ h(C, { children: "Wrap up this workout and record how it went." })] }),
|
|
474
|
+
/* @__PURE__ */ g("div", {
|
|
465
475
|
className: "space-y-4 px-1",
|
|
466
476
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
477
|
+
K.length === 0 && /* @__PURE__ */ g("div", {
|
|
478
|
+
className: "flex items-start gap-2.5 rounded-xl border border-status-warning-text/40 bg-status-warning-bg-subtle p-3",
|
|
479
|
+
children: [/* @__PURE__ */ h(ce, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ g("p", {
|
|
480
|
+
className: "text-sm text-text-secondary",
|
|
481
|
+
children: [/* @__PURE__ */ h("span", {
|
|
482
|
+
className: "font-medium text-text-primary",
|
|
483
|
+
children: "No sets logged."
|
|
484
|
+
}), " You can still complete this session, but nothing was recorded for it."]
|
|
485
|
+
})]
|
|
486
|
+
}),
|
|
487
|
+
/* @__PURE__ */ g("div", {
|
|
468
488
|
className: "grid grid-cols-2 gap-3",
|
|
469
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ g("div", {
|
|
470
490
|
className: "space-y-1.5",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ h(b, {
|
|
472
492
|
htmlFor: "myb-complete-calories",
|
|
473
493
|
children: "Calories burned"
|
|
474
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ h(y, {
|
|
475
495
|
id: "myb-complete-calories",
|
|
476
496
|
type: "number",
|
|
477
497
|
inputMode: "numeric",
|
|
@@ -483,12 +503,12 @@ function A() {
|
|
|
483
503
|
})),
|
|
484
504
|
placeholder: "Optional"
|
|
485
505
|
})]
|
|
486
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ g("div", {
|
|
487
507
|
className: "space-y-1.5",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ h(b, {
|
|
489
509
|
htmlFor: "myb-complete-rpe",
|
|
490
510
|
children: "Perceived exertion (1–10)"
|
|
491
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ h(y, {
|
|
492
512
|
id: "myb-complete-rpe",
|
|
493
513
|
type: "number",
|
|
494
514
|
inputMode: "numeric",
|
|
@@ -503,12 +523,12 @@ function A() {
|
|
|
503
523
|
})]
|
|
504
524
|
})]
|
|
505
525
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ g("div", {
|
|
507
527
|
className: "space-y-1.5",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
528
|
+
children: [/* @__PURE__ */ h(b, {
|
|
509
529
|
htmlFor: "myb-complete-notes",
|
|
510
530
|
children: "Notes"
|
|
511
|
-
}), /* @__PURE__ */
|
|
531
|
+
}), /* @__PURE__ */ h(ve, {
|
|
512
532
|
id: "myb-complete-notes",
|
|
513
533
|
rows: 3,
|
|
514
534
|
value: V.notes,
|
|
@@ -519,17 +539,17 @@ function A() {
|
|
|
519
539
|
placeholder: "How did the session feel?"
|
|
520
540
|
})]
|
|
521
541
|
}),
|
|
522
|
-
U && /* @__PURE__ */
|
|
542
|
+
U && /* @__PURE__ */ h("p", {
|
|
523
543
|
className: "text-sm text-status-error-text",
|
|
524
544
|
children: U
|
|
525
545
|
})
|
|
526
546
|
]
|
|
527
547
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(_, {
|
|
529
549
|
variant: "outline",
|
|
530
550
|
onClick: () => B(!1),
|
|
531
551
|
children: "Cancel"
|
|
532
|
-
}), /* @__PURE__ */
|
|
552
|
+
}), /* @__PURE__ */ h(_, {
|
|
533
553
|
onClick: async () => {
|
|
534
554
|
W(null);
|
|
535
555
|
try {
|