fix(widget): powered toggle persistence, copy buttons, version dates, showLessonsCount, color pickers, and loading spinner

This commit is contained in:
Rotimi Best
2026-06-13 11:24:20 +01:00
parent 094683b551
commit 0975f82c8b
14 changed files with 153 additions and 74 deletions
@@ -56,7 +56,8 @@ export function getCourseExcerpt(course: TWidgetPayloadCourse, maxLength = 160):
return `${flat.slice(0, maxLength - 1).trim()}…`;
}
export function formatLessonsLine(course: TWidgetPayloadCourse): string {
export function formatLessonsLine(course: TWidgetPayloadCourse, showLessonsCount?: boolean): string {
if (showLessonsCount === false) return '';
const parts: string[] = [];
if (course.lessonCount) parts.push(`${course.lessonCount} lessons`);
if (course.exerciseCount) parts.push(`${course.exerciseCount} exercises`);