@burdenoff/microfe-mybodyshield 2026.827.1 → 2026.830.1
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/MyBodyShieldRoot.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
- package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
- package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
- package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
- package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
- package/dist/mybodyshield/components/FileLink.js +27 -18
- package/dist/mybodyshield/components/FileLink.js.map +1 -1
- package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
- package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
- package/dist/mybodyshield/components/MybDiscussion.js +59 -58
- package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
- package/dist/mybodyshield/components/MybTags.d.ts +1 -1
- package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
- package/dist/mybodyshield/components/MybTags.js +83 -74
- package/dist/mybodyshield/components/MybTags.js.map +1 -1
- package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
- package/dist/mybodyshield/components/PageDisabled.js +16 -11
- package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
- package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
- package/dist/mybodyshield/components/Pagination.js +36 -27
- package/dist/mybodyshield/components/Pagination.js.map +1 -1
- package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
- package/dist/mybodyshield/components/StateViews.js +42 -34
- package/dist/mybodyshield/components/StateViews.js.map +1 -1
- package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
- package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
- package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
- package/dist/mybodyshield/hooks/index.d.ts +1 -0
- package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/index.js +1 -0
- package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
- package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useTr.js +12 -0
- package/dist/mybodyshield/hooks/useTr.js.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/DashboardPage.js +157 -136
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
- package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/SettingsPage.js +50 -59
- package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
- package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
- package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
- package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/ai/AiControlsPage.js +255 -266
- package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
- package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/coaching/CoachingPage.js +321 -301
- package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
- package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
- package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
- package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsPage.js +290 -284
- package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
- package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
- package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
- package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
- package/dist/mybodyshield/utils/i18n.d.ts +1 -2
- package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
- package/dist/mybodyshield/utils/i18n.js +15 -0
- package/dist/mybodyshield/utils/i18n.js.map +1 -0
- package/package.json +1 -1
|
@@ -3,133 +3,154 @@ import { PageLayout as t } from "../../components/PageLayout.js";
|
|
|
3
3
|
import { formatKcal as n, formatNumber as ee, formatRelativeTime as te } from "../../utils/formatters.js";
|
|
4
4
|
import { StatusBadge as ne } from "../../components/StatusBadge.js";
|
|
5
5
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
6
|
-
import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
|
|
7
|
-
import { FilterTabs as o } from "../../components/FilterTabs.js";
|
|
8
|
-
import { Pagination as s } from "../../components/Pagination.js";
|
|
9
6
|
import "../../context/index.js";
|
|
10
|
-
import { useMybProgramWorkouts as
|
|
11
|
-
import { useOffsetPager as
|
|
12
|
-
import { useMyBodyShieldAnalytics as
|
|
7
|
+
import { useMybProgramWorkouts as i, useMybPrograms as a, useMybSessions as o, useMybStartSession as s } from "../../hooks/useMyBodyShieldApi.js";
|
|
8
|
+
import { useOffsetPager as re } from "../../hooks/usePager.js";
|
|
9
|
+
import { useMyBodyShieldAnalytics as ie } from "../../hooks/useMyBodyShieldAnalytics.js";
|
|
10
|
+
import { useTr as c } from "../../hooks/useTr.js";
|
|
13
11
|
import "../../hooks/index.js";
|
|
12
|
+
import { ErrorView as l, LoadingView as ae } from "../../components/StateViews.js";
|
|
13
|
+
import { FilterTabs as u } from "../../components/FilterTabs.js";
|
|
14
|
+
import { Pagination as d } from "../../components/Pagination.js";
|
|
14
15
|
import "../../components/index.js";
|
|
15
|
-
import { motion as
|
|
16
|
-
import { useReducedMotion as
|
|
17
|
-
import { IconChip as
|
|
18
|
-
import { useState as
|
|
19
|
-
import { CalendarClock as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { Button as
|
|
16
|
+
import { motion as f } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
17
|
+
import { useReducedMotion as p } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
|
|
18
|
+
import { IconChip as oe, Meter as se } from "../_shared/visuals.js";
|
|
19
|
+
import { useState as m } from "react";
|
|
20
|
+
import { CalendarClock as h, CheckCircle2 as g, Flame as _, Gauge as ce, ListChecks as le, PlayCircle as v, Plus as y, SkipForward as b } from "lucide-react";
|
|
21
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
22
|
+
import { Button as w, GlassCard as T, Input as E, Label as D, ResponsiveDialog as ue, ResponsiveDialogContent as de, ResponsiveDialogDescription as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as me, ResponsiveDialogTitle as he, Select as O, SelectContent as k, SelectItem as A, SelectTrigger as j, SelectValue as M, Textarea as N } from "@burdenoff/fe-libs/ui";
|
|
22
23
|
//#region src/mybodyshield/pages/train/SessionsPage.tsx
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
function P(e) {
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
value: "ALL",
|
|
28
|
+
label: e("mybodyshield.pages.train.all", "All")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "SCHEDULED",
|
|
32
|
+
label: e("mybodyshield.pages.train.scheduled", "Scheduled")
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "IN_PROGRESS",
|
|
36
|
+
label: e("mybodyshield.pages.train.live", "Live")
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "COMPLETED",
|
|
40
|
+
label: e("mybodyshield.pages.train.completed", "Completed")
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
var F = 24, I = [
|
|
41
45
|
.16,
|
|
42
46
|
1,
|
|
43
47
|
.3,
|
|
44
48
|
1
|
|
45
|
-
],
|
|
46
|
-
programId:
|
|
47
|
-
workoutId:
|
|
49
|
+
], L = "__none__", R = "__none__", z = {
|
|
50
|
+
programId: L,
|
|
51
|
+
workoutId: R,
|
|
48
52
|
scheduledFor: "",
|
|
49
53
|
notes: ""
|
|
50
54
|
};
|
|
51
|
-
function
|
|
55
|
+
function ge(e) {
|
|
52
56
|
switch (e.status) {
|
|
53
57
|
case "IN_PROGRESS": return {
|
|
54
|
-
icon:
|
|
58
|
+
icon: v,
|
|
55
59
|
tint: "var(--color-accent-teal)",
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
titleKey: "mybodyshield.pages.train.liveWorkoutInProgress",
|
|
61
|
+
titleFallback: "Live workout in progress",
|
|
62
|
+
stampLabelKey: "mybodyshield.pages.train.startedAgo",
|
|
63
|
+
stampLabelFallback: "Started {{time}}",
|
|
58
64
|
stamp: e.startedAt ?? e.createdAt
|
|
59
65
|
};
|
|
60
66
|
case "COMPLETED": return {
|
|
61
|
-
icon:
|
|
67
|
+
icon: g,
|
|
62
68
|
tint: "var(--color-status-success-text)",
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
titleKey: "mybodyshield.pages.train.completedTitle",
|
|
70
|
+
titleFallback: e.caloriesBurned > 0 ? "{{kcal}} burned" : "Workout completed",
|
|
71
|
+
titleParams: e.caloriesBurned > 0 ? { kcal: n(e.caloriesBurned) } : void 0,
|
|
72
|
+
stampLabelKey: "mybodyshield.pages.train.completedAgo",
|
|
73
|
+
stampLabelFallback: "Completed {{time}}",
|
|
65
74
|
stamp: e.completedAt ?? e.startedAt ?? e.createdAt
|
|
66
75
|
};
|
|
67
76
|
case "SKIPPED": return {
|
|
68
|
-
icon:
|
|
77
|
+
icon: b,
|
|
69
78
|
tint: "var(--color-text-secondary)",
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
titleKey: "mybodyshield.pages.train.skippedSession",
|
|
80
|
+
titleFallback: "Skipped session",
|
|
81
|
+
stampLabelKey: "mybodyshield.pages.train.scheduledAgo",
|
|
82
|
+
stampLabelFallback: "Scheduled {{time}}",
|
|
72
83
|
stamp: e.scheduledFor ?? e.createdAt
|
|
73
84
|
};
|
|
74
85
|
default: return {
|
|
75
|
-
icon:
|
|
86
|
+
icon: h,
|
|
76
87
|
tint: "var(--color-accent-primary)",
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
titleKey: "mybodyshield.pages.train.scheduledSession",
|
|
89
|
+
titleFallback: "Scheduled session",
|
|
90
|
+
stampLabelKey: "mybodyshield.pages.train.scheduledAgo",
|
|
91
|
+
stampLabelFallback: "Scheduled {{time}}",
|
|
79
92
|
stamp: e.scheduledFor ?? e.createdAt
|
|
80
93
|
};
|
|
81
94
|
}
|
|
82
95
|
}
|
|
83
|
-
function
|
|
84
|
-
let { navigateTo:
|
|
96
|
+
function B() {
|
|
97
|
+
let h = c(), { navigateTo: g, workspaceId: v } = e(), b = p(), B = ie(), _e = P(h), [V, ve] = m("ALL"), H = re(F), U = o({
|
|
85
98
|
status: V === "ALL" ? void 0 : V,
|
|
86
99
|
pagination: {
|
|
87
|
-
limit:
|
|
100
|
+
limit: F,
|
|
88
101
|
offset: H.offset
|
|
89
102
|
}
|
|
90
|
-
}),
|
|
103
|
+
}), ye = a({
|
|
91
104
|
status: "ACTIVE",
|
|
92
105
|
pagination: { limit: 50 }
|
|
93
|
-
}).data?.items ?? [], W =
|
|
94
|
-
|
|
106
|
+
}).data?.items ?? [], W = s(), [be, G] = m(!1), [K, q] = m(z), [J, Y] = m(null), X = K.programId === L ? void 0 : K.programId, Z = i(X).data ?? [], Q = U.data?.items ?? [], xe = U.data?.pageInfo?.hasMore ?? !1, Se = (e) => {
|
|
107
|
+
ve(e), H.reset();
|
|
95
108
|
}, $ = () => {
|
|
96
|
-
q(
|
|
109
|
+
q(z), Y(null), G(!0), B.emitIntent("session", "create", { workspaceId: v });
|
|
97
110
|
};
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
title: "Train",
|
|
100
|
-
description: "Live workout sessions — start, log sets, and complete.",
|
|
101
|
-
actions: /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ C(t, {
|
|
112
|
+
title: h("mybodyshield.pages.train.title", "Train"),
|
|
113
|
+
description: h("mybodyshield.pages.train.description", "Live workout sessions — start, log sets, and complete."),
|
|
114
|
+
actions: /* @__PURE__ */ C(w, {
|
|
102
115
|
onClick: $,
|
|
103
|
-
children: [
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ S(y, { className: "h-4 w-4" }),
|
|
118
|
+
" ",
|
|
119
|
+
h("mybodyshield.pages.train.startSession", "Start session")
|
|
120
|
+
]
|
|
104
121
|
}),
|
|
105
122
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ S("div", {
|
|
107
124
|
className: "mb-6",
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
-
options:
|
|
125
|
+
children: /* @__PURE__ */ S(u, {
|
|
126
|
+
options: _e,
|
|
110
127
|
value: V,
|
|
111
|
-
onChange:
|
|
128
|
+
onChange: Se
|
|
112
129
|
})
|
|
113
130
|
}),
|
|
114
|
-
U.isLoading ? /* @__PURE__ */
|
|
115
|
-
message: "We couldn't load your workout sessions.",
|
|
131
|
+
U.isLoading ? /* @__PURE__ */ S(ae, { label: h("mybodyshield.pages.train.loading", "Loading your sessions…") }) : U.isError ? /* @__PURE__ */ S(l, {
|
|
132
|
+
message: h("mybodyshield.pages.train.error", "We couldn't load your workout sessions."),
|
|
116
133
|
onRetry: () => U.refetch()
|
|
117
|
-
}) : Q.length === 0 ? /* @__PURE__ */
|
|
134
|
+
}) : Q.length === 0 ? /* @__PURE__ */ S(r, {
|
|
118
135
|
illustration: "empty-data",
|
|
119
|
-
icon: /* @__PURE__ */
|
|
120
|
-
title: V === "ALL" ? "No sessions yet" : "No sessions in this state",
|
|
121
|
-
description: V === "ALL" ? "Start a workout session to begin logging sets and tracking your training." : "Try a different filter, or start a new workout session.",
|
|
122
|
-
action: /* @__PURE__ */
|
|
136
|
+
icon: /* @__PURE__ */ S(_, { className: "h-10 w-10" }),
|
|
137
|
+
title: V === "ALL" ? h("mybodyshield.pages.train.emptyTitle", "No sessions yet") : h("mybodyshield.pages.train.emptyFilteredTitle", "No sessions in this state"),
|
|
138
|
+
description: V === "ALL" ? h("mybodyshield.pages.train.emptyDescription", "Start a workout session to begin logging sets and tracking your training.") : h("mybodyshield.pages.train.emptyFilteredDescription", "Try a different filter, or start a new workout session."),
|
|
139
|
+
action: /* @__PURE__ */ C(w, {
|
|
123
140
|
onClick: $,
|
|
124
|
-
children: [
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ S(y, { className: "h-4 w-4" }),
|
|
143
|
+
" ",
|
|
144
|
+
h("mybodyshield.pages.train.startSession", "Start session")
|
|
145
|
+
]
|
|
125
146
|
})
|
|
126
|
-
}) : /* @__PURE__ */
|
|
147
|
+
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
|
|
127
148
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
128
149
|
children: Q.map((e, t) => {
|
|
129
|
-
let r =
|
|
130
|
-
return /* @__PURE__ */
|
|
150
|
+
let r = ge(e), i = r.icon, a = e.status === "IN_PROGRESS", o = e.sets?.length, s = e.perceivedExertion;
|
|
151
|
+
return /* @__PURE__ */ S(f.button, {
|
|
131
152
|
type: "button",
|
|
132
|
-
onClick: () =>
|
|
153
|
+
onClick: () => g(`train/${e.id}`),
|
|
133
154
|
className: "block w-full text-left",
|
|
134
155
|
initial: b ? !1 : {
|
|
135
156
|
opacity: 0,
|
|
@@ -142,164 +163,160 @@ function V() {
|
|
|
142
163
|
transition: b ? { duration: 0 } : {
|
|
143
164
|
duration: .35,
|
|
144
165
|
delay: Math.min(t, 8) * .05,
|
|
145
|
-
ease:
|
|
166
|
+
ease: I
|
|
146
167
|
},
|
|
147
168
|
whileHover: b ? void 0 : { y: -3 },
|
|
148
169
|
whileTap: b ? void 0 : { scale: .995 },
|
|
149
|
-
children: /* @__PURE__ */ T
|
|
170
|
+
children: /* @__PURE__ */ C(T, {
|
|
150
171
|
treatment: "plain",
|
|
151
172
|
glow: a,
|
|
152
173
|
className: "h-full p-4 transition-shadow hover:shadow-float" + (a ? " ring-1 ring-inset ring-[color-mix(in_oklab,var(--color-action-primary-bg)_45%,transparent)]" : ""),
|
|
153
174
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ C("div", {
|
|
155
176
|
className: "flex items-center justify-between gap-2",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
157
|
-
icon: /* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ S(oe, {
|
|
178
|
+
icon: /* @__PURE__ */ S(i, { className: "h-4 w-4" }),
|
|
158
179
|
tint: r.tint
|
|
159
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ S(ne, { status: e.status })]
|
|
160
181
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ S("p", {
|
|
162
183
|
className: "mt-3 text-base font-semibold text-text-primary",
|
|
163
|
-
children: r.
|
|
184
|
+
children: h(r.titleKey, r.titleFallback, r.titleParams)
|
|
164
185
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ S("p", {
|
|
166
187
|
className: "mt-0.5 text-xs text-text-tertiary",
|
|
167
|
-
children:
|
|
168
|
-
r.stampLabel,
|
|
169
|
-
" ",
|
|
170
|
-
te(r.stamp)
|
|
171
|
-
]
|
|
188
|
+
children: h(r.stampLabelKey, r.stampLabelFallback, { time: te(r.stamp) })
|
|
172
189
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ C("div", {
|
|
174
191
|
className: "mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
175
192
|
children: [
|
|
176
|
-
e.caloriesBurned > 0 && /* @__PURE__ */
|
|
193
|
+
e.caloriesBurned > 0 && /* @__PURE__ */ C("span", {
|
|
177
194
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ S(_, { className: "h-3.5 w-3.5 text-status-warning-text" }), n(e.caloriesBurned)]
|
|
179
196
|
}),
|
|
180
|
-
s != null && /* @__PURE__ */
|
|
197
|
+
s != null && /* @__PURE__ */ C("span", {
|
|
181
198
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
182
|
-
children: [
|
|
183
|
-
/* @__PURE__ */ w(ae, { className: "h-3.5 w-3.5 text-accent" }),
|
|
184
|
-
"RPE ",
|
|
185
|
-
s,
|
|
186
|
-
"/10"
|
|
187
|
-
]
|
|
199
|
+
children: [/* @__PURE__ */ S(ce, { className: "h-3.5 w-3.5 text-accent" }), h("mybodyshield.pages.train.rpe", "RPE {{rpe}}/10", { rpe: s })]
|
|
188
200
|
}),
|
|
189
|
-
o != null && o > 0 && /* @__PURE__ */
|
|
201
|
+
o != null && o > 0 && /* @__PURE__ */ C("span", {
|
|
190
202
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
191
203
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ S(le, { className: "h-3.5 w-3.5 text-accent" }),
|
|
193
205
|
ee(o),
|
|
194
|
-
"
|
|
206
|
+
" ",
|
|
207
|
+
h("mybodyshield.pages.train.sets", "sets")
|
|
195
208
|
]
|
|
196
209
|
})
|
|
197
210
|
]
|
|
198
211
|
}),
|
|
199
|
-
s != null && /* @__PURE__ */
|
|
212
|
+
s != null && /* @__PURE__ */ C("div", {
|
|
200
213
|
className: "mt-3",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ C("div", {
|
|
202
215
|
className: "mb-1 flex items-center justify-between text-[11px] text-text-tertiary",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ S("span", { children: h("mybodyshield.pages.train.rpeIntensity", "RPE intensity") }), /* @__PURE__ */ S("span", {
|
|
204
217
|
className: "tabular-nums",
|
|
205
|
-
children:
|
|
218
|
+
children: h("mybodyshield.pages.train.rpeOutOfTen", "{{rpe}}/10", { rpe: s })
|
|
206
219
|
})]
|
|
207
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ S(se, {
|
|
208
221
|
value: s * 10,
|
|
209
222
|
height: 6
|
|
210
223
|
})]
|
|
211
224
|
}),
|
|
212
|
-
a && /* @__PURE__ */
|
|
225
|
+
a && /* @__PURE__ */ S("p", {
|
|
213
226
|
className: "mt-3 inline-flex items-center gap-1 text-xs font-semibold text-action-primary-bg",
|
|
214
|
-
children: "In progress — Resume →"
|
|
227
|
+
children: h("mybodyshield.pages.train.resume", "In progress — Resume →")
|
|
215
228
|
})
|
|
216
229
|
]
|
|
217
230
|
})
|
|
218
231
|
}, e.id);
|
|
219
232
|
})
|
|
220
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ S(d, {
|
|
221
234
|
page: H.page,
|
|
222
|
-
pageSize:
|
|
235
|
+
pageSize: F,
|
|
223
236
|
itemCount: Q.length,
|
|
224
|
-
hasMore:
|
|
237
|
+
hasMore: xe,
|
|
225
238
|
onPageChange: (e) => H.onPageChange(e)
|
|
226
239
|
})] }),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
open:
|
|
240
|
+
/* @__PURE__ */ S(ue, {
|
|
241
|
+
open: be,
|
|
229
242
|
onOpenChange: G,
|
|
230
|
-
children: /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ C(de, { children: [
|
|
244
|
+
/* @__PURE__ */ C(me, { children: [/* @__PURE__ */ S(he, { children: h("mybodyshield.pages.train.startDialogTitle", "Start a workout session") }), /* @__PURE__ */ S(fe, { children: h("mybodyshield.pages.train.startDialogDescription", "Begin a live session now, or schedule one for later. Attach an active program to keep your training organised.") })] }),
|
|
245
|
+
/* @__PURE__ */ C("div", {
|
|
233
246
|
className: "space-y-4 px-1",
|
|
234
247
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ C("div", {
|
|
236
249
|
className: "space-y-1.5",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ S(D, {
|
|
238
251
|
htmlFor: "myb-start-program",
|
|
239
|
-
children: "Program (optional)"
|
|
240
|
-
}), /* @__PURE__ */
|
|
252
|
+
children: h("mybodyshield.pages.train.programOptional", "Program (optional)")
|
|
253
|
+
}), /* @__PURE__ */ C(O, {
|
|
241
254
|
value: K.programId,
|
|
242
255
|
onValueChange: (e) => q((t) => ({
|
|
243
256
|
...t,
|
|
244
257
|
programId: e,
|
|
245
|
-
workoutId:
|
|
258
|
+
workoutId: R
|
|
246
259
|
})),
|
|
247
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ S(j, {
|
|
248
261
|
id: "myb-start-program",
|
|
249
|
-
children: /* @__PURE__ */
|
|
250
|
-
}), /* @__PURE__ */
|
|
251
|
-
value:
|
|
252
|
-
children: "No program"
|
|
253
|
-
}),
|
|
262
|
+
children: /* @__PURE__ */ S(M, { placeholder: h("mybodyshield.pages.train.noProgram", "No program") })
|
|
263
|
+
}), /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, {
|
|
264
|
+
value: L,
|
|
265
|
+
children: h("mybodyshield.pages.train.noProgram", "No program")
|
|
266
|
+
}), ye.map((e) => /* @__PURE__ */ S(A, {
|
|
254
267
|
value: e.id,
|
|
255
268
|
children: e.name
|
|
256
269
|
}, e.id))] })]
|
|
257
270
|
})]
|
|
258
271
|
}),
|
|
259
|
-
X && Z.length > 0 && /* @__PURE__ */
|
|
272
|
+
X && Z.length > 0 && /* @__PURE__ */ C("div", {
|
|
260
273
|
className: "space-y-1.5",
|
|
261
274
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ S(D, {
|
|
263
276
|
htmlFor: "myb-start-workout",
|
|
264
|
-
children: "Workout (optional)"
|
|
277
|
+
children: h("mybodyshield.pages.train.workoutOptional", "Workout (optional)")
|
|
265
278
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ C(O, {
|
|
267
280
|
value: K.workoutId,
|
|
268
281
|
onValueChange: (e) => q((t) => ({
|
|
269
282
|
...t,
|
|
270
283
|
workoutId: e
|
|
271
284
|
})),
|
|
272
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ S(j, {
|
|
273
286
|
id: "myb-start-workout",
|
|
274
|
-
children: /* @__PURE__ */
|
|
275
|
-
}), /* @__PURE__ */
|
|
276
|
-
value:
|
|
277
|
-
children: "No specific workout"
|
|
278
|
-
}), Z.map((e) => /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ S(M, { placeholder: h("mybodyshield.pages.train.noSpecificWorkout", "No specific workout") })
|
|
288
|
+
}), /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, {
|
|
289
|
+
value: R,
|
|
290
|
+
children: h("mybodyshield.pages.train.noSpecificWorkout", "No specific workout")
|
|
291
|
+
}), Z.map((e) => /* @__PURE__ */ C(A, {
|
|
279
292
|
value: e.id,
|
|
280
293
|
children: [
|
|
281
294
|
e.name,
|
|
282
|
-
" —
|
|
295
|
+
" — ",
|
|
296
|
+
h("mybodyshield.pages.programDetail.week", "Week"),
|
|
297
|
+
" ",
|
|
283
298
|
e.weekNumber,
|
|
284
|
-
",
|
|
299
|
+
", ",
|
|
300
|
+
h("mybodyshield.pages.programDetail.day", "Day"),
|
|
301
|
+
" ",
|
|
285
302
|
e.dayOfWeek
|
|
286
303
|
]
|
|
287
304
|
}, e.id))] })]
|
|
288
305
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ S("p", {
|
|
290
307
|
className: "text-xs text-text-tertiary",
|
|
291
|
-
children: "Attach a planned workout to guide this session exercise-by-exercise."
|
|
308
|
+
children: h("mybodyshield.pages.train.attachWorkoutHint", "Attach a planned workout to guide this session exercise-by-exercise.")
|
|
292
309
|
})
|
|
293
310
|
]
|
|
294
311
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ C("div", {
|
|
296
313
|
className: "space-y-1.5",
|
|
297
314
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ S(D, {
|
|
299
316
|
htmlFor: "myb-start-scheduled",
|
|
300
|
-
children: "Scheduled for (optional)"
|
|
317
|
+
children: h("mybodyshield.pages.train.scheduledForOptional", "Scheduled for (optional)")
|
|
301
318
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ S(E, {
|
|
303
320
|
id: "myb-start-scheduled",
|
|
304
321
|
type: "datetime-local",
|
|
305
322
|
value: K.scheduledFor,
|
|
@@ -308,18 +325,18 @@ function V() {
|
|
|
308
325
|
scheduledFor: e.target.value
|
|
309
326
|
}))
|
|
310
327
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ S("p", {
|
|
312
329
|
className: "text-xs text-text-tertiary",
|
|
313
|
-
children: "Leave empty to start a live session right now."
|
|
330
|
+
children: h("mybodyshield.pages.train.scheduledForHint", "Leave empty to start a live session right now.")
|
|
314
331
|
})
|
|
315
332
|
]
|
|
316
333
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ C("div", {
|
|
318
335
|
className: "space-y-1.5",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ S(D, {
|
|
320
337
|
htmlFor: "myb-start-notes",
|
|
321
|
-
children: "Notes (optional)"
|
|
322
|
-
}), /* @__PURE__ */
|
|
338
|
+
children: h("mybodyshield.pages.train.notesOptional", "Notes (optional)")
|
|
339
|
+
}), /* @__PURE__ */ S(N, {
|
|
323
340
|
id: "myb-start-notes",
|
|
324
341
|
rows: 3,
|
|
325
342
|
value: K.notes,
|
|
@@ -327,40 +344,40 @@ function V() {
|
|
|
327
344
|
...t,
|
|
328
345
|
notes: e.target.value
|
|
329
346
|
})),
|
|
330
|
-
placeholder: "Focus, target lifts, how you're feeling…"
|
|
347
|
+
placeholder: h("mybodyshield.pages.train.notesPlaceholder", "Focus, target lifts, how you're feeling…")
|
|
331
348
|
})]
|
|
332
349
|
}),
|
|
333
|
-
J && /* @__PURE__ */
|
|
350
|
+
J && /* @__PURE__ */ S("p", {
|
|
334
351
|
className: "text-sm text-status-error-text",
|
|
335
352
|
children: J
|
|
336
353
|
})
|
|
337
354
|
]
|
|
338
355
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ C(pe, { children: [/* @__PURE__ */ S(w, {
|
|
340
357
|
variant: "outline",
|
|
341
358
|
onClick: () => G(!1),
|
|
342
359
|
disabled: W.isPending,
|
|
343
|
-
children: "Cancel"
|
|
344
|
-
}), /* @__PURE__ */ w
|
|
360
|
+
children: h("mybodyshield.common.cancel", "Cancel")
|
|
361
|
+
}), /* @__PURE__ */ S(w, {
|
|
345
362
|
onClick: async () => {
|
|
346
363
|
Y(null);
|
|
347
364
|
try {
|
|
348
365
|
let e = await W.mutateAsync({
|
|
349
366
|
programId: X,
|
|
350
|
-
workoutId: K.workoutId ===
|
|
367
|
+
workoutId: K.workoutId === R ? void 0 : K.workoutId,
|
|
351
368
|
scheduledFor: K.scheduledFor ? new Date(K.scheduledFor).toISOString() : void 0,
|
|
352
369
|
notes: K.notes.trim() ? K.notes.trim() : void 0
|
|
353
370
|
});
|
|
354
|
-
|
|
371
|
+
B.emitFact("session", "started", {
|
|
355
372
|
workspaceId: v,
|
|
356
373
|
entityId: e.id
|
|
357
|
-
}), G(!1),
|
|
374
|
+
}), G(!1), g(`train/${e.id}`);
|
|
358
375
|
} catch (e) {
|
|
359
|
-
Y(e instanceof Error ? e.message : "Failed to start the session.");
|
|
376
|
+
Y(e instanceof Error ? e.message : h("mybodyshield.pages.train.failedToStart", "Failed to start the session."));
|
|
360
377
|
}
|
|
361
378
|
},
|
|
362
379
|
disabled: W.isPending,
|
|
363
|
-
children: W.isPending ? "Starting…" : "Start session"
|
|
380
|
+
children: W.isPending ? h("mybodyshield.common.starting", "Starting") + "…" : h("mybodyshield.pages.train.startSession", "Start session")
|
|
364
381
|
})] })
|
|
365
382
|
] })
|
|
366
383
|
})
|
|
@@ -368,6 +385,6 @@ function V() {
|
|
|
368
385
|
});
|
|
369
386
|
}
|
|
370
387
|
//#endregion
|
|
371
|
-
export {
|
|
388
|
+
export { B as SessionsPage };
|
|
372
389
|
|
|
373
390
|
//# sourceMappingURL=SessionsPage.js.map
|