diff --git a/src/components/generic/Blocks/Client/Advertisements/Hero.jsx b/src/components/generic/Blocks/Client/Advertisements/Hero.jsx index 483ce1a..2780d2b 100644 --- a/src/components/generic/Blocks/Client/Advertisements/Hero.jsx +++ b/src/components/generic/Blocks/Client/Advertisements/Hero.jsx @@ -131,7 +131,7 @@ export function Hero({ ads, onCtaClick }) { {/* Navigation and Progress — only meaningful with more than one slide */} {ads.length > 1 && ( -
+
diff --git a/src/components/generic/Blocks/Client/VideoBlock.jsx b/src/components/generic/Blocks/Client/VideoBlock.jsx index 4f9bd3d..60f2c58 100644 --- a/src/components/generic/Blocks/Client/VideoBlock.jsx +++ b/src/components/generic/Blocks/Client/VideoBlock.jsx @@ -516,6 +516,7 @@ export function VideoBlock({ content, onWatchProgress, resumePercent, antiSkipEn playsInline controlsList="nodownload nofullscreen noremoteplayback" disablePictureInPicture + disableRemotePlayback onContextMenu={(e) => e.preventDefault()} className={`w-full h-full ${isFullscreen ? "object-contain" : "object-cover"}`} /> @@ -610,7 +611,7 @@ export function VideoBlock({ content, onWatchProgress, resumePercent, antiSkipEn style={{ left: `${hoverProgress.x}px`, transform: "translateX(-50%)" }} >
-
{fmtTime(hoverProgress.time)}
diff --git a/src/modules/admin/pages/courses/AddCourse.jsx b/src/modules/admin/pages/courses/AddCourse.jsx index cd8faa1..37bb8d4 100644 --- a/src/modules/admin/pages/courses/AddCourse.jsx +++ b/src/modules/admin/pages/courses/AddCourse.jsx @@ -181,8 +181,19 @@ export default function AddCourse() { }, }); - const { fields: objectiveFields, append: appendObjective, remove: removeObjective } = + const { fields: objectiveFields, append: appendObjective, remove: removeObjective, insert: insertObjective } = useFieldArray({ control, name: "objectives" }); + + const handleObjectivePaste = (e, index) => { + const text = e.clipboardData.getData("text"); + const lines = text.split(/\r\n|\r|\n/).map((l) => l.trim()).filter(Boolean); + if (lines.length <= 1) return; + e.preventDefault(); + setValue(`objectives.${index}.text`, lines[0], { shouldDirty: true, shouldValidate: true }); + lines.slice(1).forEach((line, i) => { + insertObjective(index + 1 + i, { text: line }); + }); + }; const { fields: roleFields, append: appendRole, remove: removeRole } = useFieldArray({ control, name: "roles" }); @@ -415,6 +426,7 @@ export default function AddCourse() { handleObjectivePaste(e, index)} />
diff --git a/src/modules/admin/pages/courses/EditCourse.jsx b/src/modules/admin/pages/courses/EditCourse.jsx index 15f2c7d..8b138ee 100644 --- a/src/modules/admin/pages/courses/EditCourse.jsx +++ b/src/modules/admin/pages/courses/EditCourse.jsx @@ -239,8 +239,19 @@ export default function EditCourse() { }, }); - const { fields: objectiveFields, append: appendObjective, remove: removeObjective } = + const { fields: objectiveFields, append: appendObjective, remove: removeObjective, insert: insertObjective } = useFieldArray({ control, name: "objectives" }); + + const handleObjectivePaste = (e, index) => { + const text = e.clipboardData.getData("text"); + const lines = text.split(/\r\n|\r|\n/).map((l) => l.trim()).filter(Boolean); + if (lines.length <= 1) return; + e.preventDefault(); + setValue(`objectives.${index}.text`, lines[0], { shouldDirty: true, shouldValidate: true }); + lines.slice(1).forEach((line, i) => { + insertObjective(index + 1 + i, { text: line }); + }); + }; const { fields: roleFields, append: appendRole, remove: removeRole } = useFieldArray({ control, name: "roles" }); @@ -675,6 +686,7 @@ export default function EditCourse() { handleObjectivePaste(e, index)} />
diff --git a/src/modules/client/pages/CourseDetails.jsx b/src/modules/client/pages/CourseDetails.jsx index 941478e..53cce3a 100644 --- a/src/modules/client/pages/CourseDetails.jsx +++ b/src/modules/client/pages/CourseDetails.jsx @@ -704,7 +704,7 @@ const CourseDetails = () => { {progressSummary.lessons_completed} of {progressSummary.lessons_total} lessons complete {progressSummary.percent}%
- +
)}
diff --git a/src/modules/client/pages/LessonDetails.jsx b/src/modules/client/pages/LessonDetails.jsx index d454203..397b547 100644 --- a/src/modules/client/pages/LessonDetails.jsx +++ b/src/modules/client/pages/LessonDetails.jsx @@ -181,7 +181,7 @@ const LessonDetails = () => { className="flex-1 flex flex-col" style={{ paddingTop: "var(--navbar-h)" }} > -
+
{taskCtx?.has_task && ( diff --git a/src/modules/client/pages/Profile.jsx b/src/modules/client/pages/Profile.jsx index fe3af3b..588af14 100644 --- a/src/modules/client/pages/Profile.jsx +++ b/src/modules/client/pages/Profile.jsx @@ -305,7 +305,7 @@ const ProfilePage = () => { }; return ( -
+
{/* ── Header card ──────────────────────────────────────────────────── */} diff --git a/src/modules/client/pages/UnitDetails.jsx b/src/modules/client/pages/UnitDetails.jsx index 242ea5c..33e4595 100644 --- a/src/modules/client/pages/UnitDetails.jsx +++ b/src/modules/client/pages/UnitDetails.jsx @@ -33,7 +33,7 @@ const LessonsRoadmap = ({ unitDetail, currentLessonId, onLessonClick, onContinue const quiz = unitDetail.quiz ?? null; return ( -
+
{lessons.map((lesson, index) => { const completed = lesson.status === "completed"; const isCurrent = lesson.lesson_id === currentLessonId; @@ -175,7 +175,7 @@ const UnitDetails = () => { return (
-
+
diff --git a/src/modules/public/pages/LandingPage.jsx b/src/modules/public/pages/LandingPage.jsx index c262a04..07b4339 100644 --- a/src/modules/public/pages/LandingPage.jsx +++ b/src/modules/public/pages/LandingPage.jsx @@ -194,7 +194,7 @@ function LandingPage() { {ContactData.map(({ id, icon: Icon, label, value }) => (