@fayz-ai/plugin-courses 0.10.2 → 0.10.4
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/index.js
CHANGED
|
@@ -473,7 +473,7 @@ function CoursesListPage() {
|
|
|
473
473
|
"button",
|
|
474
474
|
{
|
|
475
475
|
onClick: () => navigateTo(`/courses/${course.id}`),
|
|
476
|
-
className: "group overflow-hidden rounded-
|
|
476
|
+
className: "group overflow-hidden rounded-card border border-border bg-card text-left transition hover:border-primary hover:shadow-md",
|
|
477
477
|
children: [
|
|
478
478
|
/* @__PURE__ */ jsx("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: course.thumbnailUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
479
479
|
/* @__PURE__ */ jsx("img", { src: course.thumbnailUrl, alt: "", className: "h-full w-full object-cover" }) }),
|
|
@@ -494,7 +494,7 @@ function CoursesListPage() {
|
|
|
494
494
|
}
|
|
495
495
|
CoursesListPage.displayName = "CoursesListPage";
|
|
496
496
|
function CourseCardSkeleton() {
|
|
497
|
-
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-
|
|
497
|
+
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-card border border-border bg-card", children: [
|
|
498
498
|
/* @__PURE__ */ jsx(Skeleton, { className: "aspect-video w-full rounded-none" }),
|
|
499
499
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3 p-4", children: [
|
|
500
500
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
@@ -987,7 +987,7 @@ function CourseEditorPage({ id }) {
|
|
|
987
987
|
] })
|
|
988
988
|
}
|
|
989
989
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
990
|
-
offers.map((offer) => /* @__PURE__ */ jsxs("div", { className: "rounded-
|
|
990
|
+
offers.map((offer) => /* @__PURE__ */ jsxs("div", { className: "rounded-card border border-border bg-card p-4 shadow-sm md:p-5", children: [
|
|
991
991
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-start justify-between gap-3", children: [
|
|
992
992
|
/* @__PURE__ */ jsx(Badge, { variant: "outline", className: "gap-1", children: offer.kind === "subscription" ? t("courses.offers.subscription") || "Subscription" : t("courses.offers.oneTime") || "One-time" }),
|
|
993
993
|
/* @__PURE__ */ jsx(
|
|
@@ -1071,7 +1071,7 @@ function CourseEditorPage({ id }) {
|
|
|
1071
1071
|
title: t("courses.editor.membersEmpty") || "No students yet",
|
|
1072
1072
|
description: t("courses.editor.membersEmptyHint") || "Buyers are enrolled here automatically after a paid order."
|
|
1073
1073
|
}
|
|
1074
|
-
) : /* @__PURE__ */ jsx("div", { className: "divide-y divide-border overflow-hidden rounded-
|
|
1074
|
+
) : /* @__PURE__ */ jsx("div", { className: "divide-y divide-border overflow-hidden rounded-card border border-border bg-card", children: students.map((s) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3", children: [
|
|
1075
1075
|
/* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold uppercase text-muted-foreground", "aria-hidden": true, children: (s.name || s.email || "?").charAt(0) }),
|
|
1076
1076
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
1077
1077
|
/* @__PURE__ */ jsx("span", { className: "truncate font-medium text-foreground", children: s.name }),
|
|
@@ -1082,7 +1082,7 @@ function CourseEditorPage({ id }) {
|
|
|
1082
1082
|
] }),
|
|
1083
1083
|
offers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1084
1084
|
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("courses.editor.accessUnlockedBy") || "Access is unlocked by" }),
|
|
1085
|
-
/* @__PURE__ */ jsx("div", { className: "divide-y divide-border overflow-hidden rounded-
|
|
1085
|
+
/* @__PURE__ */ jsx("div", { className: "divide-y divide-border overflow-hidden rounded-card border border-border bg-card", children: offers.map((offer) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3", children: [
|
|
1086
1086
|
/* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", "aria-hidden": true, children: /* @__PURE__ */ jsx(Lock, { className: "h-4 w-4" }) }),
|
|
1087
1087
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-medium text-foreground", children: offer.name }),
|
|
1088
1088
|
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm tabular-nums text-muted-foreground", children: formatMoney(offer.price, offer.currency) })
|
|
@@ -1250,7 +1250,7 @@ function SortableModuleCard({
|
|
|
1250
1250
|
{
|
|
1251
1251
|
ref: setNodeRef,
|
|
1252
1252
|
style,
|
|
1253
|
-
className: "overflow-hidden rounded-
|
|
1253
|
+
className: "overflow-hidden rounded-card border border-border bg-card shadow-sm",
|
|
1254
1254
|
children: [
|
|
1255
1255
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 px-2 py-2 sm:gap-2 sm:px-3", children: [
|
|
1256
1256
|
/* @__PURE__ */ jsx(
|
|
@@ -1361,7 +1361,7 @@ function SortableLessonRow({ t, lesson, autoFocusId, onAutoFocused, onPatchLesso
|
|
|
1361
1361
|
{
|
|
1362
1362
|
ref: setNodeRef,
|
|
1363
1363
|
style,
|
|
1364
|
-
className: "group rounded-
|
|
1364
|
+
className: "group rounded-card border bg-card transition-colors " + (open ? "border-border" : "border-transparent hover:border-border"),
|
|
1365
1365
|
children: [
|
|
1366
1366
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 px-1.5 py-1.5 sm:gap-2 sm:px-2", children: [
|
|
1367
1367
|
/* @__PURE__ */ jsx(
|
|
@@ -1732,8 +1732,8 @@ function SubscriptionsPage({ navTabs, activeNavTab } = {}) {
|
|
|
1732
1732
|
] })
|
|
1733
1733
|
] }) }
|
|
1734
1734
|
];
|
|
1735
|
-
return /* @__PURE__ */
|
|
1736
|
-
|
|
1735
|
+
return /* @__PURE__ */ jsx(
|
|
1736
|
+
OrderListView,
|
|
1737
1737
|
{
|
|
1738
1738
|
title: t("courses.subs.title") || "Subscriptions",
|
|
1739
1739
|
subtitle: t("courses.subs.subtitle") || "Recurring plans and MRR.",
|
|
@@ -1743,20 +1743,14 @@ function SubscriptionsPage({ navTabs, activeNavTab } = {}) {
|
|
|
1743
1743
|
const target = tabs?.find((tb) => tb.value === v);
|
|
1744
1744
|
if (target) navigateTo(target.route);
|
|
1745
1745
|
},
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
columns,
|
|
1755
|
-
rows: subs ?? [],
|
|
1756
|
-
empty: t("courses.subs.empty") || "No subscriptions yet."
|
|
1757
|
-
}
|
|
1758
|
-
)
|
|
1759
|
-
]
|
|
1746
|
+
stats: [
|
|
1747
|
+
{ label: t("courses.subs.active") || "Active subscriptions", value: String(active.length) },
|
|
1748
|
+
{ label: t("courses.subs.mrr") || "Monthly recurring revenue", value: formatMoney(mrr, currency) }
|
|
1749
|
+
],
|
|
1750
|
+
columns,
|
|
1751
|
+
rows: subs ?? [],
|
|
1752
|
+
loading: subs === null,
|
|
1753
|
+
empty: t("courses.subs.empty") || "No subscriptions yet."
|
|
1760
1754
|
}
|
|
1761
1755
|
);
|
|
1762
1756
|
}
|
|
@@ -1881,7 +1875,6 @@ function CoursesSettingsTab() {
|
|
|
1881
1875
|
PluginSettingsPanel,
|
|
1882
1876
|
{
|
|
1883
1877
|
title: t("courses.settings.title") || "Course settings",
|
|
1884
|
-
subtitle: t("courses.settings.subtitle") || "Payments, currency and checkout methods",
|
|
1885
1878
|
generalSettings: /* @__PURE__ */ jsx(CoursesGeneralSettings, {}),
|
|
1886
1879
|
hostPluginId: "courses",
|
|
1887
1880
|
routeBase: "/settings/courses"
|