@burdenoff/microfe-mybodyshield 2026.821.2 → 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 +279 -231
- 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 +349 -258
- 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 +327 -220
- 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
|
@@ -2,54 +2,59 @@ import { PageLayout as e } from "../../components/PageLayout.js";
|
|
|
2
2
|
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
3
|
import { formatDate as n, formatNumber as r, formatRelativeTime as i } from "../../utils/formatters.js";
|
|
4
4
|
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useMybLogRecovery as te, useMybRecoveryLogs as a } from "../../hooks/useMyBodyShieldApi.js";
|
|
6
|
+
import { useTr as o } from "../../hooks/useTr.js";
|
|
7
|
+
import "../../hooks/index.js";
|
|
8
|
+
import { ErrorView as s, LoadingView as c, Section as l } from "../../components/StateViews.js";
|
|
6
9
|
import { DataTable as ne } from "../../components/DataTable.js";
|
|
7
10
|
import { FilterTabs as re } from "../../components/FilterTabs.js";
|
|
8
|
-
import { useMybLogRecovery as ie, useMybRecoveryLogs as s } from "../../hooks/useMyBodyShieldApi.js";
|
|
9
|
-
import "../../hooks/index.js";
|
|
10
11
|
import "../../components/index.js";
|
|
11
|
-
import { motion as
|
|
12
|
-
import { useReducedMotion as
|
|
13
|
-
import { IconChip as
|
|
14
|
-
import { Tooltip as
|
|
15
|
-
import { ResponsiveContainer as
|
|
12
|
+
import { motion as u } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
13
|
+
import { useReducedMotion as ie } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
|
|
14
|
+
import { IconChip as d, RECOVERY_META as f } from "../_shared/visuals.js";
|
|
15
|
+
import { Tooltip as ae } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
16
|
+
import { ResponsiveContainer as oe } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
16
17
|
import { ReferenceDot as p } from "../../../node_modules/recharts/es6/cartesian/ReferenceDot.js";
|
|
17
|
-
import { CartesianGrid as
|
|
18
|
-
import { Area as
|
|
19
|
-
import { XAxis as
|
|
20
|
-
import { YAxis as
|
|
21
|
-
import { AreaChart as
|
|
18
|
+
import { CartesianGrid as se } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
19
|
+
import { Area as ce } from "../../../node_modules/recharts/es6/cartesian/Area.js";
|
|
20
|
+
import { XAxis as le } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
21
|
+
import { YAxis as ue } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
22
|
+
import { AreaChart as de } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
22
23
|
import { useMemo as m, useState as h } from "react";
|
|
23
24
|
import { HeartPulse as g, Plus as _ } from "lucide-react";
|
|
24
25
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
25
|
-
import { Button as b, GlassCard as
|
|
26
|
+
import { Button as b, GlassCard as fe, Input as x, Label as S, ResponsiveDialog as pe, ResponsiveDialogContent as me, ResponsiveDialogDescription as he, ResponsiveDialogFooter as ge, ResponsiveDialogHeader as _e, ResponsiveDialogTitle as ve, Select as ye, SelectContent as be, SelectItem as xe, SelectTrigger as Se, SelectValue as Ce, Spinner as we, Textarea as Te } from "@burdenoff/fe-libs/ui";
|
|
26
27
|
//#region src/mybodyshield/pages/recovery/RecoveryPage.tsx
|
|
27
|
-
var
|
|
28
|
+
var C = [
|
|
28
29
|
"SLEEP",
|
|
29
30
|
"READINESS",
|
|
30
31
|
"SORENESS",
|
|
31
32
|
"STRESS",
|
|
32
33
|
"MOOD"
|
|
33
|
-
],
|
|
34
|
-
|
|
35
|
-
label: "All"
|
|
36
|
-
}, ...T.map((e) => ({
|
|
37
|
-
value: e,
|
|
38
|
-
label: d[e].label
|
|
39
|
-
}))], E = "var(--color-action-primary-bg)", D = (e) => e >= 70 ? "success" : e >= 40 ? "warning" : "error", O = (e) => e >= 7 ? "success" : e >= 6 ? "warning" : "error";
|
|
40
|
-
function k(e) {
|
|
34
|
+
], w = "var(--color-action-primary-bg)", T = (e) => e >= 70 ? "success" : e >= 40 ? "warning" : "error", E = (e) => e >= 7 ? "success" : e >= 6 ? "warning" : "error";
|
|
35
|
+
function D(e) {
|
|
41
36
|
let t = (e) => String(e).padStart(2, "0");
|
|
42
37
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
|
|
43
38
|
}
|
|
44
|
-
var
|
|
39
|
+
var O = (e = "READINESS") => ({
|
|
45
40
|
metric: e,
|
|
46
41
|
score: "",
|
|
47
42
|
sleepHours: "",
|
|
48
43
|
notes: "",
|
|
49
|
-
loggedAt:
|
|
44
|
+
loggedAt: D(/* @__PURE__ */ new Date())
|
|
50
45
|
});
|
|
51
|
-
function
|
|
52
|
-
let
|
|
46
|
+
function k(e, t) {
|
|
47
|
+
let n = "mybodyshield.pages.recovery.metricNames";
|
|
48
|
+
switch (t) {
|
|
49
|
+
case "SLEEP": return e(`${n}.sleep`, "Sleep");
|
|
50
|
+
case "READINESS": return e(`${n}.readiness`, "Readiness");
|
|
51
|
+
case "SORENESS": return e(`${n}.soreness`, "Soreness");
|
|
52
|
+
case "STRESS": return e(`${n}.stress`, "Stress");
|
|
53
|
+
case "MOOD": return e(`${n}.mood`, "Mood");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function A() {
|
|
57
|
+
let D = o(), [A, Ee] = h("ALL"), [De, j] = h(!1), [M, N] = h(O), [P, F] = h(null), Oe = a("READINESS"), ke = a("SLEEP"), Ae = a("MOOD"), I = a(A === "ALL" ? void 0 : A), L = te(), R = ie(), z = (e, t = !0) => R ? { initial: !1 } : {
|
|
53
58
|
initial: {
|
|
54
59
|
opacity: 0,
|
|
55
60
|
y: 14
|
|
@@ -71,67 +76,73 @@ function j() {
|
|
|
71
76
|
damping: 22
|
|
72
77
|
}
|
|
73
78
|
} } : {}
|
|
74
|
-
},
|
|
79
|
+
}, B = Oe.data?.items ?? [], V = ke.data?.items ?? [], H = Ae.data?.items ?? [], U = I.data?.items ?? [], W = m(() => [...B].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [B]), G = m(() => [...H].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [H]), K = m(() => V.length === 0 ? null : V.reduce((e, t) => e + t.sleepHours, 0) / V.length, [V]), q = A === "SLEEP", J = A === "ALL" ? D("mybodyshield.pages.recovery.allMetrics", "All metrics") : k(D, A), je = [{
|
|
80
|
+
value: "ALL",
|
|
81
|
+
label: D("mybodyshield.common.all", "All")
|
|
82
|
+
}, ...C.map((e) => ({
|
|
83
|
+
value: e,
|
|
84
|
+
label: k(D, e)
|
|
85
|
+
}))], Y = m(() => [...U].sort((e, t) => new Date(e.loggedAt).getTime() - new Date(t.loggedAt).getTime()).map((e) => ({
|
|
75
86
|
label: n(e.loggedAt),
|
|
76
|
-
value:
|
|
77
|
-
})), [
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
if (
|
|
81
|
-
if (
|
|
82
|
-
|
|
87
|
+
value: q ? e.sleepHours : e.score
|
|
88
|
+
})), [U, q]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z = (e = "READINESS") => {
|
|
89
|
+
N(O(e)), F(null), j(!0);
|
|
90
|
+
}, Q = M.metric === "SLEEP", Me = async () => {
|
|
91
|
+
if (F(null), Q) {
|
|
92
|
+
if (M.sleepHours.trim() === "") {
|
|
93
|
+
F(D("mybodyshield.pages.recovery.sleepHoursRequired", "Sleep hours is required for sleep entries."));
|
|
83
94
|
return;
|
|
84
95
|
}
|
|
85
|
-
let e = Number(
|
|
96
|
+
let e = Number(M.sleepHours);
|
|
86
97
|
if (!Number.isFinite(e) || e < 0 || e > 24) {
|
|
87
|
-
|
|
98
|
+
F(D("mybodyshield.pages.recovery.sleepHoursRange", "Enter sleep hours between 0 and 24."));
|
|
88
99
|
return;
|
|
89
100
|
}
|
|
90
|
-
} else if (
|
|
91
|
-
|
|
101
|
+
} else if (M.score.trim() === "") {
|
|
102
|
+
F(D("mybodyshield.pages.recovery.scoreRequired", "A score is required."));
|
|
92
103
|
return;
|
|
93
104
|
}
|
|
94
|
-
if (
|
|
95
|
-
let e = Number(
|
|
105
|
+
if (M.score.trim() !== "") {
|
|
106
|
+
let e = Number(M.score);
|
|
96
107
|
if (!Number.isFinite(e) || e < 0 || e > 100) {
|
|
97
|
-
|
|
108
|
+
F(D("mybodyshield.pages.recovery.scoreRange", "Enter a score between 0 and 100."));
|
|
98
109
|
return;
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
let e = {
|
|
102
|
-
metric:
|
|
103
|
-
score:
|
|
104
|
-
sleepHours:
|
|
105
|
-
notes:
|
|
106
|
-
loggedAt:
|
|
113
|
+
metric: M.metric,
|
|
114
|
+
score: M.score.trim() === "" ? void 0 : Number(M.score),
|
|
115
|
+
sleepHours: M.sleepHours.trim() === "" ? void 0 : Number(M.sleepHours),
|
|
116
|
+
notes: M.notes.trim() || void 0,
|
|
117
|
+
loggedAt: M.loggedAt ? new Date(M.loggedAt).toISOString() : void 0
|
|
107
118
|
};
|
|
108
119
|
try {
|
|
109
|
-
await
|
|
120
|
+
await L.mutateAsync(e), j(!1);
|
|
110
121
|
} catch (e) {
|
|
111
|
-
|
|
122
|
+
F(e instanceof Error ? e.message : D("mybodyshield.pages.recovery.failedToLog", "Failed to log recovery."));
|
|
112
123
|
}
|
|
113
|
-
},
|
|
124
|
+
}, $ = [
|
|
114
125
|
{
|
|
115
126
|
key: "metric",
|
|
116
|
-
header: "Metric",
|
|
117
|
-
sortValue: (e) =>
|
|
127
|
+
header: D("mybodyshield.pages.recovery.metricColumn", "Metric"),
|
|
128
|
+
sortValue: (e) => k(D, e.metric),
|
|
118
129
|
render: (e) => {
|
|
119
|
-
let t =
|
|
130
|
+
let t = f[e.metric], n = t.icon;
|
|
120
131
|
return /* @__PURE__ */ y("span", {
|
|
121
132
|
className: "inline-flex items-center gap-2.5",
|
|
122
|
-
children: [/* @__PURE__ */ v(
|
|
133
|
+
children: [/* @__PURE__ */ v(d, {
|
|
123
134
|
icon: /* @__PURE__ */ v(n, { className: "h-4 w-4" }),
|
|
124
135
|
tint: t.tint
|
|
125
136
|
}), /* @__PURE__ */ v("span", {
|
|
126
137
|
className: "font-medium text-text-primary",
|
|
127
|
-
children:
|
|
138
|
+
children: k(D, e.metric)
|
|
128
139
|
})]
|
|
129
140
|
});
|
|
130
141
|
}
|
|
131
142
|
},
|
|
132
143
|
{
|
|
133
144
|
key: "value",
|
|
134
|
-
header: "Value",
|
|
145
|
+
header: D("mybodyshield.pages.recovery.valueColumn", "Value"),
|
|
135
146
|
align: "right",
|
|
136
147
|
sortValue: (e) => e.metric === "SLEEP" ? e.sleepHours : e.score,
|
|
137
148
|
render: (e) => e.metric === "SLEEP" ? /* @__PURE__ */ y("span", {
|
|
@@ -144,7 +155,7 @@ function j() {
|
|
|
144
155
|
},
|
|
145
156
|
{
|
|
146
157
|
key: "notes",
|
|
147
|
-
header: "Notes",
|
|
158
|
+
header: D("mybodyshield.pages.recovery.notesColumn", "Notes"),
|
|
148
159
|
hideOnMobile: !0,
|
|
149
160
|
render: (e) => e.notes && e.notes.trim() ? /* @__PURE__ */ v("span", {
|
|
150
161
|
className: "text-text-secondary",
|
|
@@ -156,7 +167,7 @@ function j() {
|
|
|
156
167
|
},
|
|
157
168
|
{
|
|
158
169
|
key: "loggedAt",
|
|
159
|
-
header: "Logged",
|
|
170
|
+
header: D("mybodyshield.pages.recovery.loggedColumn", "Logged"),
|
|
160
171
|
align: "right",
|
|
161
172
|
sortValue: (e) => new Date(e.loggedAt).getTime(),
|
|
162
173
|
render: (e) => /* @__PURE__ */ v("span", {
|
|
@@ -164,80 +175,79 @@ function j() {
|
|
|
164
175
|
children: i(e.loggedAt)
|
|
165
176
|
})
|
|
166
177
|
}
|
|
167
|
-
],
|
|
178
|
+
], Ne = f.READINESS.icon, Pe = f.SLEEP.icon, Fe = f.MOOD.icon;
|
|
168
179
|
return /* @__PURE__ */ y(e, {
|
|
169
|
-
title: "Recovery",
|
|
170
|
-
description: "Sleep, readiness, soreness, stress & mood.",
|
|
180
|
+
title: D("mybodyshield.pages.recovery.title", "Recovery"),
|
|
181
|
+
description: D("mybodyshield.pages.recovery.description", "Sleep, readiness, soreness, stress & mood."),
|
|
171
182
|
actions: /* @__PURE__ */ y(b, {
|
|
172
183
|
className: "gap-2",
|
|
173
|
-
onClick: () =>
|
|
174
|
-
children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "Log recovery"]
|
|
184
|
+
onClick: () => Z(),
|
|
185
|
+
children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")]
|
|
175
186
|
}),
|
|
176
187
|
children: [
|
|
177
|
-
/* @__PURE__ */ y(
|
|
178
|
-
...
|
|
188
|
+
/* @__PURE__ */ y(u.div, {
|
|
189
|
+
...z(0),
|
|
179
190
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
180
191
|
children: [
|
|
181
192
|
/* @__PURE__ */ v(t, {
|
|
182
|
-
icon: /* @__PURE__ */ v(
|
|
183
|
-
icon: /* @__PURE__ */ v(
|
|
184
|
-
tint:
|
|
193
|
+
icon: /* @__PURE__ */ v(d, {
|
|
194
|
+
icon: /* @__PURE__ */ v(Ne, { className: "h-5 w-5" }),
|
|
195
|
+
tint: f.READINESS.tint
|
|
185
196
|
}),
|
|
186
|
-
value:
|
|
187
|
-
label: "Latest readiness",
|
|
188
|
-
accent:
|
|
189
|
-
footer:
|
|
197
|
+
value: W ? r(W.score) : "—",
|
|
198
|
+
label: D("mybodyshield.pages.recovery.latestReadiness", "Latest readiness"),
|
|
199
|
+
accent: W ? T(W.score) : void 0,
|
|
200
|
+
footer: W ? /* @__PURE__ */ v("p", {
|
|
190
201
|
className: "text-xs text-text-tertiary",
|
|
191
|
-
children: i(
|
|
202
|
+
children: i(W.loggedAt)
|
|
192
203
|
}) : /* @__PURE__ */ v("button", {
|
|
193
204
|
type: "button",
|
|
194
|
-
onClick: () =>
|
|
205
|
+
onClick: () => Z("READINESS"),
|
|
195
206
|
className: "text-xs font-medium text-accent hover:underline",
|
|
196
|
-
children: "Log readiness →"
|
|
207
|
+
children: D("mybodyshield.pages.recovery.logReadiness", "Log readiness →")
|
|
197
208
|
})
|
|
198
209
|
}),
|
|
199
210
|
/* @__PURE__ */ v(t, {
|
|
200
|
-
icon: /* @__PURE__ */ v(
|
|
201
|
-
icon: /* @__PURE__ */ v(
|
|
202
|
-
tint:
|
|
211
|
+
icon: /* @__PURE__ */ v(d, {
|
|
212
|
+
icon: /* @__PURE__ */ v(Pe, { className: "h-5 w-5" }),
|
|
213
|
+
tint: f.SLEEP.tint
|
|
203
214
|
}),
|
|
204
|
-
value:
|
|
205
|
-
label: "Avg sleep",
|
|
206
|
-
accent:
|
|
207
|
-
footer:
|
|
215
|
+
value: K == null ? "—" : `${r(K, { maximumFractionDigits: 1 })} h`,
|
|
216
|
+
label: D("mybodyshield.pages.recovery.avgSleep", "Avg sleep"),
|
|
217
|
+
accent: K == null ? void 0 : E(K),
|
|
218
|
+
footer: V.length > 0 ? /* @__PURE__ */ y("p", {
|
|
208
219
|
className: "text-xs text-text-tertiary",
|
|
209
220
|
children: [
|
|
210
221
|
/* @__PURE__ */ v("span", {
|
|
211
222
|
className: "tabular-nums text-text-secondary",
|
|
212
|
-
children:
|
|
223
|
+
children: V.length
|
|
213
224
|
}),
|
|
214
225
|
" ",
|
|
215
|
-
|
|
216
|
-
" logged"
|
|
226
|
+
V.length === 1 ? D("mybodyshield.pages.recovery.nightsLogged", "{{count}} night logged", { count: V.length }) : D("mybodyshield.pages.recovery.nightsLoggedPlural", "{{count}} nights logged", { count: V.length })
|
|
217
227
|
]
|
|
218
228
|
}) : /* @__PURE__ */ v("button", {
|
|
219
229
|
type: "button",
|
|
220
|
-
onClick: () =>
|
|
230
|
+
onClick: () => Z("SLEEP"),
|
|
221
231
|
className: "text-xs font-medium text-accent hover:underline",
|
|
222
|
-
children: "Log sleep →"
|
|
232
|
+
children: D("mybodyshield.pages.recovery.logSleep", "Log sleep →")
|
|
223
233
|
})
|
|
224
234
|
}),
|
|
225
235
|
/* @__PURE__ */ v(t, {
|
|
226
|
-
icon: /* @__PURE__ */ v(
|
|
227
|
-
icon: /* @__PURE__ */ v(
|
|
228
|
-
tint:
|
|
236
|
+
icon: /* @__PURE__ */ v(d, {
|
|
237
|
+
icon: /* @__PURE__ */ v(Fe, { className: "h-5 w-5" }),
|
|
238
|
+
tint: f.MOOD.tint
|
|
229
239
|
}),
|
|
230
|
-
value:
|
|
231
|
-
label: "Latest mood",
|
|
232
|
-
accent:
|
|
233
|
-
footer:
|
|
240
|
+
value: G ? r(G.score) : "—",
|
|
241
|
+
label: D("mybodyshield.pages.recovery.latestMood", "Latest mood"),
|
|
242
|
+
accent: G ? T(G.score) : void 0,
|
|
243
|
+
footer: G ? /* @__PURE__ */ v("p", {
|
|
234
244
|
className: "text-xs text-text-tertiary",
|
|
235
|
-
children: i(
|
|
245
|
+
children: i(G.loggedAt)
|
|
236
246
|
}) : /* @__PURE__ */ v("button", {
|
|
237
247
|
type: "button",
|
|
238
|
-
onClick: () =>
|
|
248
|
+
onClick: () => Z("MOOD"),
|
|
239
249
|
className: "text-xs font-medium text-accent hover:underline",
|
|
240
|
-
children: "Log mood →"
|
|
250
|
+
children: D("mybodyshield.pages.recovery.logMood", "Log mood →")
|
|
241
251
|
})
|
|
242
252
|
})
|
|
243
253
|
]
|
|
@@ -245,26 +255,26 @@ function j() {
|
|
|
245
255
|
/* @__PURE__ */ v("div", {
|
|
246
256
|
className: "mt-6 flex flex-wrap items-center gap-3",
|
|
247
257
|
children: /* @__PURE__ */ v(re, {
|
|
248
|
-
options:
|
|
249
|
-
value:
|
|
250
|
-
onChange:
|
|
258
|
+
options: je,
|
|
259
|
+
value: A,
|
|
260
|
+
onChange: Ee
|
|
251
261
|
})
|
|
252
262
|
}),
|
|
253
|
-
/* @__PURE__ */ v(
|
|
254
|
-
title:
|
|
255
|
-
description:
|
|
256
|
-
children: /* @__PURE__ */ v(
|
|
257
|
-
...
|
|
258
|
-
children: /* @__PURE__ */ v(
|
|
263
|
+
/* @__PURE__ */ v(l, {
|
|
264
|
+
title: D("mybodyshield.pages.recovery.trendTitle", "{{metric}} trend", { metric: J }),
|
|
265
|
+
description: q ? D("mybodyshield.pages.recovery.sleepTrendDescription", "Sleep hours over time.") : D("mybodyshield.pages.recovery.scoreTrendDescription", "Recovery score over time."),
|
|
266
|
+
children: /* @__PURE__ */ v(u.div, {
|
|
267
|
+
...z(.08),
|
|
268
|
+
children: /* @__PURE__ */ v(fe, {
|
|
259
269
|
treatment: "glass",
|
|
260
270
|
className: "rounded-2xl p-6 transition-shadow duration-300 hover:shadow-2xl",
|
|
261
|
-
children:
|
|
271
|
+
children: I.isLoading ? /* @__PURE__ */ v("div", {
|
|
262
272
|
className: "flex h-[280px] items-center justify-center",
|
|
263
|
-
children: /* @__PURE__ */ v(
|
|
264
|
-
}) :
|
|
265
|
-
message: "We couldn't load this metric's history.",
|
|
266
|
-
onRetry: () =>
|
|
267
|
-
}) :
|
|
273
|
+
children: /* @__PURE__ */ v(we, { size: "lg" })
|
|
274
|
+
}) : I.isError ? /* @__PURE__ */ v(s, {
|
|
275
|
+
message: D("mybodyshield.pages.recovery.chartError", "We couldn't load this metric's history."),
|
|
276
|
+
onRetry: () => I.refetch()
|
|
277
|
+
}) : Y.length === 0 ? /* @__PURE__ */ y("div", {
|
|
268
278
|
className: "flex h-[280px] flex-col items-center justify-center text-center",
|
|
269
279
|
children: [
|
|
270
280
|
/* @__PURE__ */ v("span", {
|
|
@@ -273,22 +283,18 @@ function j() {
|
|
|
273
283
|
}),
|
|
274
284
|
/* @__PURE__ */ v("p", {
|
|
275
285
|
className: "mt-3 text-sm font-medium text-text-primary",
|
|
276
|
-
children: "Nothing to chart yet"
|
|
286
|
+
children: D("mybodyshield.pages.recovery.emptyChartTitle", "Nothing to chart yet")
|
|
277
287
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ v("p", {
|
|
279
289
|
className: "mt-1 max-w-xs text-xs text-text-tertiary",
|
|
280
|
-
children:
|
|
281
|
-
"Log a few ",
|
|
282
|
-
Y.toLowerCase(),
|
|
283
|
-
" entries to see your trend here."
|
|
284
|
-
]
|
|
290
|
+
children: D("mybodyshield.pages.recovery.emptyChartDescription", "Log a few {{metric}} entries to see your trend here.", { metric: J.toLowerCase() })
|
|
285
291
|
})
|
|
286
292
|
]
|
|
287
|
-
}) : /* @__PURE__ */ v(
|
|
293
|
+
}) : /* @__PURE__ */ v(oe, {
|
|
288
294
|
width: "100%",
|
|
289
295
|
height: 280,
|
|
290
|
-
children: /* @__PURE__ */ y(
|
|
291
|
-
data:
|
|
296
|
+
children: /* @__PURE__ */ y(de, {
|
|
297
|
+
data: Y,
|
|
292
298
|
margin: {
|
|
293
299
|
top: 12,
|
|
294
300
|
right: 16,
|
|
@@ -305,27 +311,27 @@ function j() {
|
|
|
305
311
|
children: [
|
|
306
312
|
/* @__PURE__ */ v("stop", {
|
|
307
313
|
offset: "0%",
|
|
308
|
-
stopColor:
|
|
314
|
+
stopColor: w,
|
|
309
315
|
stopOpacity: .38
|
|
310
316
|
}),
|
|
311
317
|
/* @__PURE__ */ v("stop", {
|
|
312
318
|
offset: "55%",
|
|
313
|
-
stopColor:
|
|
319
|
+
stopColor: w,
|
|
314
320
|
stopOpacity: .12
|
|
315
321
|
}),
|
|
316
322
|
/* @__PURE__ */ v("stop", {
|
|
317
323
|
offset: "100%",
|
|
318
|
-
stopColor:
|
|
324
|
+
stopColor: w,
|
|
319
325
|
stopOpacity: 0
|
|
320
326
|
})
|
|
321
327
|
]
|
|
322
328
|
}) }),
|
|
323
|
-
/* @__PURE__ */ v(
|
|
329
|
+
/* @__PURE__ */ v(se, {
|
|
324
330
|
vertical: !1,
|
|
325
331
|
stroke: "var(--color-border-seam)",
|
|
326
332
|
strokeDasharray: "4 4"
|
|
327
333
|
}),
|
|
328
|
-
/* @__PURE__ */ v(
|
|
334
|
+
/* @__PURE__ */ v(le, {
|
|
329
335
|
dataKey: "label",
|
|
330
336
|
tickLine: !1,
|
|
331
337
|
axisLine: !1,
|
|
@@ -336,7 +342,7 @@ function j() {
|
|
|
336
342
|
fontSize: 12
|
|
337
343
|
}
|
|
338
344
|
}),
|
|
339
|
-
/* @__PURE__ */ v(
|
|
345
|
+
/* @__PURE__ */ v(ue, {
|
|
340
346
|
width: 44,
|
|
341
347
|
tickLine: !1,
|
|
342
348
|
axisLine: !1,
|
|
@@ -345,7 +351,7 @@ function j() {
|
|
|
345
351
|
fontSize: 12
|
|
346
352
|
}
|
|
347
353
|
}),
|
|
348
|
-
/* @__PURE__ */ v(
|
|
354
|
+
/* @__PURE__ */ v(ae, {
|
|
349
355
|
contentStyle: {
|
|
350
356
|
background: "var(--color-bg-surface)",
|
|
351
357
|
border: "1px solid var(--color-border-seam)",
|
|
@@ -359,11 +365,11 @@ function j() {
|
|
|
359
365
|
strokeDasharray: "4 4"
|
|
360
366
|
}
|
|
361
367
|
}),
|
|
362
|
-
/* @__PURE__ */ v(
|
|
368
|
+
/* @__PURE__ */ v(ce, {
|
|
363
369
|
type: "monotone",
|
|
364
370
|
dataKey: "value",
|
|
365
|
-
name:
|
|
366
|
-
stroke:
|
|
371
|
+
name: q ? D("mybodyshield.pages.recovery.sleepHours", "Sleep hours") : D("mybodyshield.pages.recovery.score", "Score"),
|
|
372
|
+
stroke: w,
|
|
367
373
|
strokeWidth: 2.5,
|
|
368
374
|
fill: "url(#myb-recovery-fill)",
|
|
369
375
|
fillOpacity: 1,
|
|
@@ -372,28 +378,28 @@ function j() {
|
|
|
372
378
|
r: 4,
|
|
373
379
|
strokeWidth: 2,
|
|
374
380
|
stroke: "var(--color-bg-surface)",
|
|
375
|
-
fill:
|
|
381
|
+
fill: w
|
|
376
382
|
},
|
|
377
|
-
isAnimationActive: !
|
|
383
|
+
isAnimationActive: !R,
|
|
378
384
|
animationDuration: 900
|
|
379
385
|
}),
|
|
380
|
-
|
|
381
|
-
x:
|
|
382
|
-
y:
|
|
386
|
+
X && /* @__PURE__ */ v(p, {
|
|
387
|
+
x: X.label,
|
|
388
|
+
y: X.value,
|
|
383
389
|
r: 12,
|
|
384
390
|
isFront: !0,
|
|
385
391
|
ifOverflow: "visible",
|
|
386
|
-
fill:
|
|
392
|
+
fill: w,
|
|
387
393
|
fillOpacity: .16,
|
|
388
394
|
stroke: "none"
|
|
389
395
|
}),
|
|
390
|
-
|
|
391
|
-
x:
|
|
392
|
-
y:
|
|
396
|
+
X && /* @__PURE__ */ v(p, {
|
|
397
|
+
x: X.label,
|
|
398
|
+
y: X.value,
|
|
393
399
|
r: 5,
|
|
394
400
|
isFront: !0,
|
|
395
401
|
ifOverflow: "visible",
|
|
396
|
-
fill:
|
|
402
|
+
fill: w,
|
|
397
403
|
stroke: "var(--color-bg-surface)",
|
|
398
404
|
strokeWidth: 2
|
|
399
405
|
})
|
|
@@ -403,27 +409,27 @@ function j() {
|
|
|
403
409
|
})
|
|
404
410
|
})
|
|
405
411
|
}),
|
|
406
|
-
/* @__PURE__ */ v(
|
|
407
|
-
...
|
|
408
|
-
children: /* @__PURE__ */ v(
|
|
409
|
-
title: "Recovery log",
|
|
410
|
-
description: "Every recovery entry, most recent first.",
|
|
411
|
-
children:
|
|
412
|
-
message: "We couldn't load your recovery logs.",
|
|
413
|
-
onRetry: () =>
|
|
414
|
-
}) :
|
|
412
|
+
/* @__PURE__ */ v(u.div, {
|
|
413
|
+
...z(.16, !1),
|
|
414
|
+
children: /* @__PURE__ */ v(l, {
|
|
415
|
+
title: D("mybodyshield.pages.recovery.recoveryLog", "Recovery log"),
|
|
416
|
+
description: D("mybodyshield.pages.recovery.recoveryLogDescription", "Every recovery entry, most recent first."),
|
|
417
|
+
children: I.isLoading ? /* @__PURE__ */ v(c, { label: D("mybodyshield.pages.recovery.loading", "Loading recovery logs…") }) : I.isError ? /* @__PURE__ */ v(s, {
|
|
418
|
+
message: D("mybodyshield.pages.recovery.error", "We couldn't load your recovery logs."),
|
|
419
|
+
onRetry: () => I.refetch()
|
|
420
|
+
}) : U.length === 0 ? /* @__PURE__ */ v(ee, {
|
|
415
421
|
illustration: "empty-data",
|
|
416
422
|
icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
|
|
417
|
-
title: "No recovery logs yet",
|
|
418
|
-
description: "Track your sleep, readiness, soreness, stress or mood to see how your body is recovering between sessions.",
|
|
423
|
+
title: D("mybodyshield.pages.recovery.emptyTitle", "No recovery logs yet"),
|
|
424
|
+
description: D("mybodyshield.pages.recovery.emptyDescription", "Track your sleep, readiness, soreness, stress or mood to see how your body is recovering between sessions."),
|
|
419
425
|
action: /* @__PURE__ */ y(b, {
|
|
420
426
|
className: "gap-2",
|
|
421
|
-
onClick: () =>
|
|
422
|
-
children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "Log recovery"]
|
|
427
|
+
onClick: () => Z(),
|
|
428
|
+
children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")]
|
|
423
429
|
})
|
|
424
430
|
}) : /* @__PURE__ */ v(ne, {
|
|
425
|
-
columns:
|
|
426
|
-
rows:
|
|
431
|
+
columns: $,
|
|
432
|
+
rows: U,
|
|
427
433
|
rowKey: (e) => e.id,
|
|
428
434
|
defaultSort: {
|
|
429
435
|
key: "loggedAt",
|
|
@@ -432,13 +438,13 @@ function j() {
|
|
|
432
438
|
})
|
|
433
439
|
})
|
|
434
440
|
}),
|
|
435
|
-
/* @__PURE__ */ v(
|
|
436
|
-
open:
|
|
437
|
-
onOpenChange:
|
|
438
|
-
children: /* @__PURE__ */ y(
|
|
441
|
+
/* @__PURE__ */ v(pe, {
|
|
442
|
+
open: De,
|
|
443
|
+
onOpenChange: j,
|
|
444
|
+
children: /* @__PURE__ */ y(me, {
|
|
439
445
|
className: "sm:max-w-[480px]",
|
|
440
446
|
children: [
|
|
441
|
-
/* @__PURE__ */ y(
|
|
447
|
+
/* @__PURE__ */ y(_e, { children: [/* @__PURE__ */ v(ve, { children: D("mybodyshield.pages.recovery.dialogTitle", "Log recovery") }), /* @__PURE__ */ v(he, { children: D("mybodyshield.pages.recovery.dialogDescription", "Capture how your body is recovering — one metric per entry.") })] }),
|
|
442
448
|
/* @__PURE__ */ y("div", {
|
|
443
449
|
className: "space-y-4 py-2",
|
|
444
450
|
children: [
|
|
@@ -446,28 +452,28 @@ function j() {
|
|
|
446
452
|
className: "space-y-1.5",
|
|
447
453
|
children: [/* @__PURE__ */ v(S, {
|
|
448
454
|
htmlFor: "myb-recovery-metric",
|
|
449
|
-
children: "Metric"
|
|
450
|
-
}), /* @__PURE__ */ y(
|
|
451
|
-
value:
|
|
452
|
-
onValueChange: (e) =>
|
|
455
|
+
children: D("mybodyshield.pages.recovery.metric", "Metric")
|
|
456
|
+
}), /* @__PURE__ */ y(ye, {
|
|
457
|
+
value: M.metric,
|
|
458
|
+
onValueChange: (e) => N((t) => ({
|
|
453
459
|
...t,
|
|
454
460
|
metric: e
|
|
455
461
|
})),
|
|
456
|
-
children: [/* @__PURE__ */ v(
|
|
462
|
+
children: [/* @__PURE__ */ v(Se, {
|
|
457
463
|
id: "myb-recovery-metric",
|
|
458
|
-
children: /* @__PURE__ */ v(
|
|
459
|
-
}), /* @__PURE__ */ v(
|
|
464
|
+
children: /* @__PURE__ */ v(Ce, {})
|
|
465
|
+
}), /* @__PURE__ */ v(be, { children: C.map((e) => /* @__PURE__ */ v(xe, {
|
|
460
466
|
value: e,
|
|
461
|
-
children:
|
|
467
|
+
children: k(D, e)
|
|
462
468
|
}, e)) })]
|
|
463
469
|
})]
|
|
464
470
|
}),
|
|
465
|
-
|
|
471
|
+
Q && /* @__PURE__ */ y("div", {
|
|
466
472
|
className: "space-y-1.5",
|
|
467
473
|
children: [
|
|
468
474
|
/* @__PURE__ */ v(S, {
|
|
469
475
|
htmlFor: "myb-recovery-sleep",
|
|
470
|
-
children: "Sleep hours"
|
|
476
|
+
children: D("mybodyshield.pages.recovery.sleepHours", "Sleep hours")
|
|
471
477
|
}),
|
|
472
478
|
/* @__PURE__ */ v(x, {
|
|
473
479
|
id: "myb-recovery-sleep",
|
|
@@ -475,25 +481,25 @@ function j() {
|
|
|
475
481
|
min: "0",
|
|
476
482
|
max: "24",
|
|
477
483
|
step: "0.1",
|
|
478
|
-
value:
|
|
479
|
-
onChange: (e) =>
|
|
484
|
+
value: M.sleepHours,
|
|
485
|
+
onChange: (e) => N((t) => ({
|
|
480
486
|
...t,
|
|
481
487
|
sleepHours: e.target.value
|
|
482
488
|
})),
|
|
483
|
-
placeholder: "e.g. 7.5"
|
|
489
|
+
placeholder: D("mybodyshield.pages.recovery.sleepHoursPlaceholder", "e.g. 7.5")
|
|
484
490
|
}),
|
|
485
491
|
/* @__PURE__ */ v("p", {
|
|
486
492
|
className: "text-xs text-text-tertiary",
|
|
487
|
-
children: "Primary measure for sleep entries."
|
|
493
|
+
children: D("mybodyshield.pages.recovery.sleepHoursHint", "Primary measure for sleep entries.")
|
|
488
494
|
})
|
|
489
495
|
]
|
|
490
496
|
}),
|
|
491
497
|
/* @__PURE__ */ y("div", {
|
|
492
498
|
className: "space-y-1.5",
|
|
493
499
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ v(S, {
|
|
495
501
|
htmlFor: "myb-recovery-score",
|
|
496
|
-
children:
|
|
502
|
+
children: Q ? D("mybodyshield.pages.recovery.scoreOptional", "Score (optional)") : D("mybodyshield.pages.recovery.score", "Score")
|
|
497
503
|
}),
|
|
498
504
|
/* @__PURE__ */ v(x, {
|
|
499
505
|
id: "myb-recovery-score",
|
|
@@ -501,16 +507,16 @@ function j() {
|
|
|
501
507
|
min: "0",
|
|
502
508
|
max: "100",
|
|
503
509
|
step: "1",
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
510
|
+
value: M.score,
|
|
511
|
+
onChange: (e) => N((t) => ({
|
|
506
512
|
...t,
|
|
507
513
|
score: e.target.value
|
|
508
514
|
})),
|
|
509
|
-
placeholder: "0–100"
|
|
515
|
+
placeholder: D("mybodyshield.pages.recovery.scorePlaceholder", "0–100")
|
|
510
516
|
}),
|
|
511
517
|
/* @__PURE__ */ v("p", {
|
|
512
518
|
className: "text-xs text-text-tertiary",
|
|
513
|
-
children:
|
|
519
|
+
children: Q ? D("mybodyshield.pages.recovery.sleepScoreHint", "Optional 0–100 sleep-quality score.") : D("mybodyshield.pages.recovery.scoreHint", "A 0–100 rating for this metric.")
|
|
514
520
|
})
|
|
515
521
|
]
|
|
516
522
|
}),
|
|
@@ -518,12 +524,12 @@ function j() {
|
|
|
518
524
|
className: "space-y-1.5",
|
|
519
525
|
children: [/* @__PURE__ */ v(S, {
|
|
520
526
|
htmlFor: "myb-recovery-at",
|
|
521
|
-
children: "Logged at"
|
|
527
|
+
children: D("mybodyshield.pages.recovery.loggedAt", "Logged at")
|
|
522
528
|
}), /* @__PURE__ */ v(x, {
|
|
523
529
|
id: "myb-recovery-at",
|
|
524
530
|
type: "datetime-local",
|
|
525
|
-
value:
|
|
526
|
-
onChange: (e) =>
|
|
531
|
+
value: M.loggedAt,
|
|
532
|
+
onChange: (e) => N((t) => ({
|
|
527
533
|
...t,
|
|
528
534
|
loggedAt: e.target.value
|
|
529
535
|
}))
|
|
@@ -533,33 +539,33 @@ function j() {
|
|
|
533
539
|
className: "space-y-1.5",
|
|
534
540
|
children: [/* @__PURE__ */ v(S, {
|
|
535
541
|
htmlFor: "myb-recovery-notes",
|
|
536
|
-
children: "Notes"
|
|
537
|
-
}), /* @__PURE__ */ v(
|
|
542
|
+
children: D("mybodyshield.common.notes", "Notes")
|
|
543
|
+
}), /* @__PURE__ */ v(Te, {
|
|
538
544
|
id: "myb-recovery-notes",
|
|
539
545
|
rows: 3,
|
|
540
|
-
value:
|
|
541
|
-
onChange: (e) =>
|
|
546
|
+
value: M.notes,
|
|
547
|
+
onChange: (e) => N((t) => ({
|
|
542
548
|
...t,
|
|
543
549
|
notes: e.target.value
|
|
544
550
|
})),
|
|
545
|
-
placeholder: "How are you feeling? (optional)"
|
|
551
|
+
placeholder: D("mybodyshield.pages.recovery.notesPlaceholder", "How are you feeling? (optional)")
|
|
546
552
|
})]
|
|
547
553
|
}),
|
|
548
|
-
|
|
554
|
+
P && /* @__PURE__ */ v("p", {
|
|
549
555
|
className: "text-sm text-status-error-text",
|
|
550
|
-
children:
|
|
556
|
+
children: P
|
|
551
557
|
})
|
|
552
558
|
]
|
|
553
559
|
}),
|
|
554
|
-
/* @__PURE__ */ y(
|
|
560
|
+
/* @__PURE__ */ y(ge, { children: [/* @__PURE__ */ v(b, {
|
|
555
561
|
variant: "outline",
|
|
556
|
-
onClick: () =>
|
|
557
|
-
disabled:
|
|
558
|
-
children: "Cancel"
|
|
562
|
+
onClick: () => j(!1),
|
|
563
|
+
disabled: L.isPending,
|
|
564
|
+
children: D("mybodyshield.common.cancel", "Cancel")
|
|
559
565
|
}), /* @__PURE__ */ v(b, {
|
|
560
|
-
onClick:
|
|
561
|
-
disabled:
|
|
562
|
-
children:
|
|
566
|
+
onClick: Me,
|
|
567
|
+
disabled: L.isPending,
|
|
568
|
+
children: L.isPending ? D("mybodyshield.common.saving", "Saving…") : D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")
|
|
563
569
|
})] })
|
|
564
570
|
]
|
|
565
571
|
})
|
|
@@ -568,6 +574,6 @@ function j() {
|
|
|
568
574
|
});
|
|
569
575
|
}
|
|
570
576
|
//#endregion
|
|
571
|
-
export {
|
|
577
|
+
export { A as RecoveryPage };
|
|
572
578
|
|
|
573
579
|
//# sourceMappingURL=RecoveryPage.js.map
|