From 8e6ff9cfe141b3f35d1a3c65184fffa9cb3a5471 Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Sat, 12 Aug 2023 11:11:42 +0000 Subject: [PATCH] CLASSROOMIO-T-105: Delete video CLASSROOMIO-T-105: Delete video CLASSROOMIO-T-105: Update color of header to blue 700 Support up to 50 MB of file upload Co-authored-by: Rotimi Best Merge-request: CLASSROOMIO-MR-46 Merged-by: Best Admin --- .../Lesson/Materials/Video/LocalVideo.svelte | 2 +- .../Course/components/Lesson/Materials/index.svelte | 12 +++++++----- src/lib/components/Navigation/app.svelte | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte b/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte index c26614fe..97d0c0ee 100644 --- a/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte +++ b/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte @@ -121,7 +121,7 @@ Oops 😬, couldn’t upload video

- Sorry we video wasn’t uploaded. The file size is too big,
maximum size is 20 MB. Try again! + Sorry we video wasn’t uploaded. The file size is too big,
maximum size is 50 MB. Try again!

fileInput?.click()} /> diff --git a/src/lib/components/Course/components/Lesson/Materials/index.svelte b/src/lib/components/Course/components/Lesson/Materials/index.svelte index 35ae7677..9c6c8a87 100644 --- a/src/lib/components/Course/components/Lesson/Materials/index.svelte +++ b/src/lib/components/Course/components/Lesson/Materials/index.svelte @@ -54,12 +54,14 @@ // problem: after we save an uploaded video, async function saveLesson() { const { data } = await fetchLesson(lessonId); - const materials = merge(data, $lesson.materials); + if (data?.videos?.length === $lesson.materials.videos.length) { + const materials = merge(data, $lesson.materials); - lesson.update((l) => ({ - ...l, - materials - })); + lesson.update((l) => ({ + ...l, + materials + })); + } handleUpdateLessonMaterials($lesson, lessonId); } diff --git a/src/lib/components/Navigation/app.svelte b/src/lib/components/Navigation/app.svelte index 00fde2b9..d124567f 100644 --- a/src/lib/components/Navigation/app.svelte +++ b/src/lib/components/Navigation/app.svelte @@ -36,7 +36,7 @@ } -