@burdenoff/microfe-technospam 2026.720.1 → 2026.728.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/technospam/api/technospamApi.d.ts +71 -0
- package/dist/technospam/api/technospamApi.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.js +189 -145
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/UpgradeGate.d.ts +24 -0
- package/dist/technospam/components/UpgradeGate.d.ts.map +1 -0
- package/dist/technospam/components/UpgradeGate.js +47 -0
- package/dist/technospam/components/UpgradeGate.js.map +1 -0
- package/dist/technospam/components/index.d.ts +1 -0
- package/dist/technospam/components/index.d.ts.map +1 -1
- package/dist/technospam/components/index.js +1 -0
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +380 -168
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +81 -77
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +200 -178
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +66 -62
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,94 +3,98 @@ import { useTechnoSpamAnalytics as t } from "../hooks/useTechnoSpamAnalytics.js"
|
|
|
3
3
|
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
5
|
import { StatCard as i } from "../components/StatCard.js";
|
|
6
|
-
import { MediaCover as a, topicIcon as
|
|
7
|
-
import { formatDuration as
|
|
8
|
-
import { EmptyView as
|
|
9
|
-
import { TagStrip as
|
|
6
|
+
import { MediaCover as a, topicIcon as ee } from "../components/MediaCover.js";
|
|
7
|
+
import { formatDuration as o, humanizeEnum as s } from "../utils/format.js";
|
|
8
|
+
import { EmptyView as te, ErrorView as c } from "../components/StateViews.js";
|
|
9
|
+
import { TagStrip as l } from "../components/TagStrip.js";
|
|
10
|
+
import { PremiumBadge as ne, UpgradeGate as re } from "../components/UpgradeGate.js";
|
|
10
11
|
import "../components/index.js";
|
|
11
|
-
import { notify as
|
|
12
|
-
import { useCertificatesQuery as
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { Award as
|
|
15
|
-
import { useSearchParams as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { Button as
|
|
12
|
+
import { notify as u } from "../lib/toast.js";
|
|
13
|
+
import { useCertificatesQuery as ie, useCourseQuery as d, useEnroll as ae, useIssueCertificate as f, useUpdateProgress as p } from "../api/technospamApi.js";
|
|
14
|
+
import { useEffect as m } from "react";
|
|
15
|
+
import { Award as h, BookOpen as g, CheckCircle2 as _, Clock as v, Eye as y, FileText as b, Layers as x, Lock as S, PlayCircle as C, ShieldCheck as oe, Sparkles as w, TrendingUp as T, Trophy as E, Users as D } from "lucide-react";
|
|
16
|
+
import { useSearchParams as se } from "react-router-dom";
|
|
17
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
18
|
+
import { Button as A, GlassCard as j, Skeleton as M } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/technospam/pages/CoursesCourseDetailsPagePage.tsx
|
|
19
|
-
var
|
|
20
|
+
var N = {
|
|
20
21
|
VIDEO: {
|
|
21
|
-
icon:
|
|
22
|
+
icon: C,
|
|
22
23
|
chip: "bg-accent-primary/15 text-accent-primary",
|
|
23
24
|
badge: "border-accent-primary/25 bg-accent-primary/10 text-accent-primary"
|
|
24
25
|
},
|
|
25
26
|
ARTICLE: {
|
|
26
|
-
icon:
|
|
27
|
+
icon: b,
|
|
27
28
|
chip: "bg-accent-indigo/15 text-accent-indigo",
|
|
28
29
|
badge: "border-accent-indigo/25 bg-accent-indigo/10 text-accent-indigo"
|
|
29
30
|
},
|
|
30
31
|
INTERACTIVE: {
|
|
31
|
-
icon:
|
|
32
|
+
icon: w,
|
|
32
33
|
chip: "bg-accent-teal/15 text-accent-teal",
|
|
33
34
|
badge: "border-accent-teal/25 bg-accent-teal/10 text-accent-teal"
|
|
34
35
|
},
|
|
35
36
|
QUIZ: {
|
|
36
|
-
icon:
|
|
37
|
+
icon: _,
|
|
37
38
|
chip: "bg-accent-purple/15 text-accent-purple",
|
|
38
39
|
badge: "border-accent-purple/25 bg-accent-purple/10 text-accent-purple"
|
|
39
40
|
},
|
|
40
41
|
PROJECT: {
|
|
41
|
-
icon:
|
|
42
|
+
icon: x,
|
|
42
43
|
chip: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
43
44
|
badge: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
|
-
function
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
function P({ icon: e, children: t }) {
|
|
48
|
+
return /* @__PURE__ */ k("span", {
|
|
48
49
|
className: "inline-flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 text-xs font-medium text-white ring-1 ring-white/25 backdrop-blur-sm",
|
|
49
|
-
children: [e ? /* @__PURE__ */
|
|
50
|
+
children: [e ? /* @__PURE__ */ O(e, { size: 12 }) : null, t]
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
let i =
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
function F({ lesson: e, index: t, done: r }) {
|
|
54
|
+
let i = N[e.kind] ?? N.ARTICLE, a = i.icon;
|
|
55
|
+
return /* @__PURE__ */ k("div", {
|
|
55
56
|
className: "group flex items-center gap-3 rounded-xl px-2 py-3 transition-colors hover:bg-bg-sunken/60",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ O("span", {
|
|
58
59
|
className: "hidden w-6 shrink-0 text-center text-sm font-medium tabular-nums text-text-muted sm:block",
|
|
59
60
|
children: t + 1
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ O("span", {
|
|
62
63
|
className: n("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg", r ? "bg-status-success-bg-subtle text-status-success-text" : i.chip),
|
|
63
|
-
children:
|
|
64
|
+
children: O(r ? _ : a, { size: 17 })
|
|
64
65
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ k("div", {
|
|
66
67
|
className: "min-w-0 flex-1",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ O("span", {
|
|
68
69
|
className: "block truncate text-sm font-medium text-text-primary",
|
|
69
70
|
children: e.title
|
|
70
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ k("div", {
|
|
71
72
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ O("span", {
|
|
73
74
|
className: n("inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium", i.badge),
|
|
74
|
-
children:
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
children: s(e.kind)
|
|
76
|
+
}), /* @__PURE__ */ k("span", {
|
|
76
77
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
77
78
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ O(v, { size: 12 }),
|
|
79
80
|
" ",
|
|
80
|
-
|
|
81
|
+
o(e.estimatedMinutes)
|
|
81
82
|
]
|
|
82
83
|
})]
|
|
83
84
|
})]
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ O("div", {
|
|
86
87
|
className: "shrink-0",
|
|
87
|
-
children: r ? /* @__PURE__ */
|
|
88
|
+
children: r ? /* @__PURE__ */ O(_, {
|
|
88
89
|
size: 18,
|
|
89
90
|
className: "text-status-success-text"
|
|
90
|
-
}) : e.isPreview ? /* @__PURE__ */
|
|
91
|
+
}) : e.isPreview ? /* @__PURE__ */ k("span", {
|
|
91
92
|
className: "inline-flex items-center gap-1 rounded-full border border-accent-primary/30 bg-accent-primary/10 px-2 py-0.5 text-[11px] font-medium text-accent-primary",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
}) : /* @__PURE__ */ k(
|
|
93
|
+
children: [/* @__PURE__ */ O(y, { size: 12 }), " Preview"]
|
|
94
|
+
}) : e.isLocked ? /* @__PURE__ */ k("span", {
|
|
95
|
+
className: "inline-flex items-center gap-1 rounded-full border border-status-warning-border/60 bg-status-warning-bg-subtle px-2 py-0.5 text-[11px] font-medium text-status-warning-text",
|
|
96
|
+
children: [/* @__PURE__ */ O(S, { size: 12 }), " Upgrade to unlock"]
|
|
97
|
+
}) : /* @__PURE__ */ O(S, {
|
|
94
98
|
size: 15,
|
|
95
99
|
className: "text-text-muted"
|
|
96
100
|
})
|
|
@@ -98,286 +102,304 @@ function I({ lesson: e, index: t, done: r }) {
|
|
|
98
102
|
]
|
|
99
103
|
});
|
|
100
104
|
}
|
|
101
|
-
function
|
|
102
|
-
let [n] =
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
function I() {
|
|
106
|
+
let [n] = se(), y = n.get("id") ?? "", { currentUser: C, workspaceId: w } = e(), { emit: N } = t(), { data: I, loading: L, error: R, refetch: z } = d(y);
|
|
107
|
+
m(() => {
|
|
108
|
+
y && N("technospam.course.viewed", {
|
|
105
109
|
workspaceId: w,
|
|
106
|
-
entityId:
|
|
110
|
+
entityId: y,
|
|
107
111
|
entityType: "TEC_COURSE"
|
|
108
112
|
});
|
|
109
113
|
}, [
|
|
110
|
-
|
|
114
|
+
y,
|
|
111
115
|
w,
|
|
112
|
-
|
|
116
|
+
N
|
|
113
117
|
]);
|
|
114
|
-
let [B, { loading: V }] =
|
|
118
|
+
let [B, { loading: V }] = ae(), [H, { loading: U }] = p(), { data: W, refetch: G } = ie(C?.id && y ? {
|
|
115
119
|
learnerId: C.id,
|
|
116
|
-
courseId:
|
|
117
|
-
} : {}), [
|
|
118
|
-
!
|
|
120
|
+
courseId: y
|
|
121
|
+
} : {}), [ce, { loading: K }] = f(), q = I?.tecCourse ?? null, J = [...q?.lessons ?? []].sort((e, t) => e.position - t.position), Y = (q?.enrollments ?? []).find((e) => e.learnerId === C?.id), X = (W?.tecListCertificates ?? []).find((e) => e.status === "ISSUED"), le = !!Y && Y.progressPct >= 100, Z = async () => {
|
|
122
|
+
!y || !C?.id || (N("technospam.course.certificate_claimed", {
|
|
119
123
|
workspaceId: w,
|
|
120
|
-
entityId:
|
|
124
|
+
entityId: y,
|
|
121
125
|
entityType: "TEC_COURSE"
|
|
122
|
-
}), (await
|
|
123
|
-
courseId:
|
|
126
|
+
}), (await ce({ variables: {
|
|
127
|
+
courseId: y,
|
|
124
128
|
learnerId: C.id,
|
|
125
129
|
score: 100
|
|
126
|
-
} })).data?.tecIssueCertificate && (
|
|
127
|
-
},
|
|
128
|
-
|
|
130
|
+
} })).data?.tecIssueCertificate && (u.success("Certificate issued", "Your verifiable certificate is ready in My Learning."), await G()));
|
|
131
|
+
}, ue = async () => {
|
|
132
|
+
y && (N("technospam.course.enroll_clicked", {
|
|
129
133
|
workspaceId: w,
|
|
130
|
-
entityId:
|
|
134
|
+
entityId: y,
|
|
131
135
|
entityType: "TEC_COURSE"
|
|
132
|
-
}), (await B({ variables: { input: { courseId:
|
|
136
|
+
}), (await B({ variables: { input: { courseId: y } } })).data?.tecEnroll && (N("technospam.course.enrolled", {
|
|
133
137
|
workspaceId: w,
|
|
134
|
-
entityId:
|
|
138
|
+
entityId: y,
|
|
135
139
|
entityType: "TEC_COURSE"
|
|
136
|
-
}),
|
|
137
|
-
},
|
|
138
|
-
if (!
|
|
139
|
-
let e = Math.min(
|
|
140
|
+
}), u.success("Enrolled", `You're enrolled in "${q?.title}".`), await z()));
|
|
141
|
+
}, de = async () => {
|
|
142
|
+
if (!Y) return;
|
|
143
|
+
let e = Math.min(J.length, Y.lessonsCompleted + 1), t = J.length ? Math.round(e / J.length * 100) : 100;
|
|
140
144
|
(await H({ variables: { input: {
|
|
141
|
-
enrollmentId:
|
|
145
|
+
enrollmentId: Y.id,
|
|
142
146
|
lessonsCompleted: e,
|
|
143
147
|
progressPct: t
|
|
144
|
-
} } })).data?.tecUpdateProgress && (
|
|
148
|
+
} } })).data?.tecUpdateProgress && (N("technospam.course.progress_updated", {
|
|
145
149
|
workspaceId: w,
|
|
146
|
-
entityId:
|
|
150
|
+
entityId: Y.id,
|
|
147
151
|
entityType: "TEC_ENROLLMENT",
|
|
148
152
|
progressPct: t
|
|
149
|
-
}),
|
|
153
|
+
}), u.success("Progress saved", `${t}% complete`), await z());
|
|
150
154
|
};
|
|
151
|
-
if (L && !
|
|
155
|
+
if (L && !q) return /* @__PURE__ */ k(r, {
|
|
152
156
|
title: "Course",
|
|
153
157
|
backPath: "/courses/courses-page",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ O(M, { className: "mb-4 h-40 w-full rounded-2xl" }), /* @__PURE__ */ O(M, { className: "h-64 w-full rounded-xl" })]
|
|
155
159
|
});
|
|
156
|
-
if (R || !
|
|
160
|
+
if (R || !q) return /* @__PURE__ */ O(r, {
|
|
157
161
|
title: "Course",
|
|
158
162
|
backPath: "/courses/courses-page",
|
|
159
|
-
children: R ? /* @__PURE__ */
|
|
163
|
+
children: R ? /* @__PURE__ */ O(c, {
|
|
160
164
|
title: "Couldn't load course",
|
|
161
165
|
error: R
|
|
162
|
-
}) : /* @__PURE__ */
|
|
166
|
+
}) : /* @__PURE__ */ O(te, {
|
|
163
167
|
title: "Course not found",
|
|
164
168
|
description: "This course may have been unpublished."
|
|
165
169
|
})
|
|
166
170
|
});
|
|
167
|
-
let Q =
|
|
168
|
-
return /* @__PURE__ */
|
|
171
|
+
let Q = Y?.lessonsCompleted ?? 0, $ = Math.max(0, J.length - Q), fe = Y && Y.progressPct >= 100 ? "Course complete — claim your certificate below." : $ === 1 ? "1 lesson to go — almost there!" : `${$} lessons to go — keep it up!`, pe = `${q.topic ?? ""} ${q.title}`;
|
|
172
|
+
return /* @__PURE__ */ k(r, {
|
|
169
173
|
backPath: "/courses/courses-page",
|
|
170
|
-
title:
|
|
171
|
-
description:
|
|
172
|
-
actions:
|
|
173
|
-
onClick:
|
|
174
|
-
disabled: U || Q >=
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
-
}) : /* @__PURE__ */ A
|
|
177
|
-
onClick:
|
|
174
|
+
title: q.title,
|
|
175
|
+
description: q.summary ?? void 0,
|
|
176
|
+
actions: Y ? /* @__PURE__ */ k(A, {
|
|
177
|
+
onClick: de,
|
|
178
|
+
disabled: U || Q >= J.length,
|
|
179
|
+
children: [/* @__PURE__ */ O(_, { size: 16 }), Q >= J.length ? "Completed" : "Complete next lesson"]
|
|
180
|
+
}) : /* @__PURE__ */ k(A, {
|
|
181
|
+
onClick: ue,
|
|
178
182
|
disabled: V,
|
|
179
183
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ O(g, { size: 16 }),
|
|
181
185
|
" ",
|
|
182
186
|
V ? "Enrolling…" : "Enroll"
|
|
183
187
|
]
|
|
184
188
|
}),
|
|
185
189
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ O(a, {
|
|
187
191
|
height: "h-40",
|
|
188
|
-
seed:
|
|
189
|
-
icon:
|
|
192
|
+
seed: pe,
|
|
193
|
+
icon: ee(q.topic ?? q.title),
|
|
190
194
|
className: "mb-5 rounded-2xl",
|
|
191
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ k("div", {
|
|
192
196
|
className: "flex w-full flex-col gap-2",
|
|
193
197
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ O("span", {
|
|
195
199
|
className: "text-xs font-medium uppercase tracking-wide text-white/80",
|
|
196
|
-
children:
|
|
200
|
+
children: q.topic ?? "Course"
|
|
197
201
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ O("h2", {
|
|
199
203
|
className: "text-2xl font-bold leading-tight text-white drop-shadow-sm sm:text-3xl",
|
|
200
|
-
children:
|
|
204
|
+
children: q.title
|
|
201
205
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ k("div", {
|
|
203
207
|
className: "flex flex-wrap items-center gap-2",
|
|
204
208
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
icon:
|
|
207
|
-
children:
|
|
209
|
+
/* @__PURE__ */ O(P, {
|
|
210
|
+
icon: T,
|
|
211
|
+
children: s(q.level)
|
|
208
212
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
icon:
|
|
211
|
-
children:
|
|
213
|
+
/* @__PURE__ */ O(P, {
|
|
214
|
+
icon: _,
|
|
215
|
+
children: s(q.status)
|
|
212
216
|
}),
|
|
213
|
-
|
|
217
|
+
q.topic ? /* @__PURE__ */ O(P, {
|
|
218
|
+
icon: x,
|
|
219
|
+
children: q.topic
|
|
220
|
+
}) : null,
|
|
221
|
+
q.isPremiumOnly ? /* @__PURE__ */ O(P, {
|
|
214
222
|
icon: S,
|
|
215
|
-
children:
|
|
223
|
+
children: "Premium"
|
|
216
224
|
}) : null
|
|
217
225
|
]
|
|
218
226
|
})
|
|
219
227
|
]
|
|
220
228
|
})
|
|
221
229
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
tags:
|
|
230
|
+
/* @__PURE__ */ O(l, {
|
|
231
|
+
tags: q.tags,
|
|
224
232
|
className: "mb-5"
|
|
225
233
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ k("div", {
|
|
227
235
|
className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
228
236
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ O(i, {
|
|
230
238
|
label: "Lessons",
|
|
231
|
-
value:
|
|
232
|
-
icon:
|
|
239
|
+
value: J.length,
|
|
240
|
+
icon: b,
|
|
233
241
|
tone: "blue"
|
|
234
242
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ O(i, {
|
|
236
244
|
label: "Duration",
|
|
237
|
-
value:
|
|
238
|
-
icon:
|
|
245
|
+
value: o(q.estimatedMinutes),
|
|
246
|
+
icon: v,
|
|
239
247
|
tone: "teal"
|
|
240
248
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ O(i, {
|
|
242
250
|
label: "Enrolled",
|
|
243
|
-
value:
|
|
251
|
+
value: q.enrollments?.length ?? 0,
|
|
244
252
|
icon: D,
|
|
245
253
|
tone: "indigo"
|
|
246
254
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ O(i, {
|
|
248
256
|
label: "Your progress",
|
|
249
|
-
value:
|
|
250
|
-
icon:
|
|
257
|
+
value: Y ? `${Y.progressPct}%` : "Not started",
|
|
258
|
+
icon: T,
|
|
251
259
|
tone: "purple"
|
|
252
260
|
})
|
|
253
261
|
]
|
|
254
262
|
}),
|
|
255
|
-
|
|
263
|
+
Y ? /* @__PURE__ */ k(j, {
|
|
256
264
|
className: "mb-6 p-5",
|
|
257
265
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ k("div", {
|
|
259
267
|
className: "mb-3 flex items-center gap-2",
|
|
260
268
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ O("span", {
|
|
262
270
|
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-accent-primary/15 text-accent-primary",
|
|
263
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ O(T, { size: 16 })
|
|
264
272
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ O("span", {
|
|
266
274
|
className: "text-sm font-semibold text-text-primary",
|
|
267
275
|
children: "Your progress"
|
|
268
276
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ k("span", {
|
|
270
278
|
className: "ml-auto text-sm text-text-secondary",
|
|
271
279
|
children: [
|
|
272
280
|
Q,
|
|
273
281
|
"/",
|
|
274
|
-
|
|
282
|
+
J.length,
|
|
275
283
|
" lessons · ",
|
|
276
|
-
|
|
284
|
+
Y.progressPct,
|
|
277
285
|
"%"
|
|
278
286
|
]
|
|
279
287
|
})
|
|
280
288
|
]
|
|
281
289
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ O("div", {
|
|
283
291
|
className: "h-2.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
284
|
-
children: /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ O("div", {
|
|
285
293
|
className: "h-full rounded-full bg-gradient-to-r from-accent-primary via-accent-indigo to-accent-purple transition-all duration-500",
|
|
286
|
-
style: { width: `${
|
|
294
|
+
style: { width: `${Y.progressPct}%` }
|
|
287
295
|
})
|
|
288
296
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ O("p", {
|
|
290
298
|
className: "mt-2 text-xs text-text-muted",
|
|
291
|
-
children:
|
|
299
|
+
children: fe
|
|
292
300
|
})
|
|
293
301
|
]
|
|
294
302
|
}) : null,
|
|
295
|
-
|
|
303
|
+
X ? /* @__PURE__ */ k(j, {
|
|
296
304
|
className: "mb-6 flex flex-wrap items-center gap-3 border border-status-success-border/60 bg-status-success-bg-subtle/30 p-4",
|
|
297
305
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ O("span", {
|
|
299
307
|
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-status-warning-bg-subtle text-status-warning-text ring-1 ring-status-warning-border/30",
|
|
300
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ O(h, { size: 22 })
|
|
301
309
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ k("div", {
|
|
303
311
|
className: "min-w-0 flex-1",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ O("div", {
|
|
305
313
|
className: "text-sm font-semibold text-text-primary",
|
|
306
314
|
children: "Certificate earned"
|
|
307
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ k("div", {
|
|
308
316
|
className: "text-xs text-text-muted",
|
|
309
317
|
children: [
|
|
310
318
|
"Serial ",
|
|
311
|
-
|
|
319
|
+
X.serial,
|
|
312
320
|
" · Score ",
|
|
313
|
-
|
|
321
|
+
X.score
|
|
314
322
|
]
|
|
315
323
|
})]
|
|
316
324
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ k("span", {
|
|
318
326
|
className: "inline-flex items-center gap-1 rounded-full border border-status-success-border bg-status-success-bg-subtle px-2.5 py-1 text-xs font-medium text-status-success-text",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ O(oe, { size: 13 }), " Verified"]
|
|
320
328
|
})
|
|
321
329
|
]
|
|
322
|
-
}) :
|
|
330
|
+
}) : le ? /* @__PURE__ */ k(j, {
|
|
323
331
|
className: "mb-6 flex flex-col items-start gap-4 border border-status-success-border/60 bg-status-success-bg-subtle/40 p-5 sm:flex-row sm:items-center sm:justify-between",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ k("div", {
|
|
325
333
|
className: "flex items-center gap-4",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ O("span", {
|
|
327
335
|
className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-status-warning-bg-subtle text-status-warning-text ring-1 ring-status-warning-border/40",
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
-
}), /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ O(E, { size: 26 })
|
|
337
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("div", {
|
|
330
338
|
className: "text-base font-semibold text-text-primary",
|
|
331
339
|
children: "You finished this course"
|
|
332
|
-
}), /* @__PURE__ */
|
|
340
|
+
}), /* @__PURE__ */ O("div", {
|
|
333
341
|
className: "text-sm text-text-muted",
|
|
334
342
|
children: "Claim your verifiable certificate of completion."
|
|
335
343
|
})] })]
|
|
336
|
-
}), /* @__PURE__ */ A
|
|
337
|
-
onClick:
|
|
338
|
-
disabled:
|
|
344
|
+
}), /* @__PURE__ */ k(A, {
|
|
345
|
+
onClick: Z,
|
|
346
|
+
disabled: K,
|
|
339
347
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ O(h, { size: 16 }),
|
|
341
349
|
" ",
|
|
342
|
-
|
|
350
|
+
K ? "Issuing…" : "Claim certificate"
|
|
343
351
|
]
|
|
344
352
|
})]
|
|
345
353
|
}) : null,
|
|
346
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ k(j, {
|
|
347
355
|
className: "p-5",
|
|
348
|
-
children: [
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
"
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ k("div", {
|
|
358
|
+
className: "mb-3 flex items-center justify-between gap-2",
|
|
359
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
360
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ O(g, {
|
|
363
|
+
size: 18,
|
|
364
|
+
className: "text-accent-primary"
|
|
365
|
+
}),
|
|
366
|
+
" Curriculum",
|
|
367
|
+
q.isPremiumOnly ? /* @__PURE__ */ O(ne, { locked: q.isLocked }) : null
|
|
368
|
+
]
|
|
369
|
+
}), J.length ? /* @__PURE__ */ k("span", {
|
|
370
|
+
className: "rounded-full bg-status-success-bg-subtle px-2.5 py-1 text-xs font-medium text-status-success-text",
|
|
371
|
+
children: [
|
|
372
|
+
Q,
|
|
373
|
+
"/",
|
|
374
|
+
J.length,
|
|
375
|
+
" completed"
|
|
376
|
+
]
|
|
377
|
+
}) : null]
|
|
378
|
+
}),
|
|
379
|
+
q.isLocked ? /* @__PURE__ */ O("div", {
|
|
380
|
+
className: "mb-4",
|
|
381
|
+
children: /* @__PURE__ */ O(re, {
|
|
382
|
+
compact: !0,
|
|
383
|
+
description: "This course is on a paid TechnoSpam plan. Preview lessons below stay free — the rest unlock once your workspace upgrades."
|
|
384
|
+
})
|
|
385
|
+
}) : null,
|
|
386
|
+
J.length === 0 ? /* @__PURE__ */ O("p", {
|
|
387
|
+
className: "py-6 text-center text-sm text-text-muted",
|
|
388
|
+
children: "Lessons for this course are being prepared."
|
|
389
|
+
}) : /* @__PURE__ */ O("div", {
|
|
390
|
+
className: "flex flex-col",
|
|
391
|
+
children: J.map((e, t) => /* @__PURE__ */ O(F, {
|
|
392
|
+
lesson: e,
|
|
393
|
+
index: t,
|
|
394
|
+
done: t < Q
|
|
395
|
+
}, e.id))
|
|
396
|
+
})
|
|
397
|
+
]
|
|
376
398
|
})
|
|
377
399
|
]
|
|
378
400
|
});
|
|
379
401
|
}
|
|
380
402
|
//#endregion
|
|
381
|
-
export {
|
|
403
|
+
export { I as CoursesCourseDetailsPagePage };
|
|
382
404
|
|
|
383
405
|
//# sourceMappingURL=CoursesCourseDetailsPagePage.js.map
|