diff --git a/src/lib/components/Apps/components/LiveChat/index.svelte b/src/lib/components/Apps/components/LiveChat/index.svelte index 9a38fa2a..7ae65e43 100644 --- a/src/lib/components/Apps/components/LiveChat/index.svelte +++ b/src/lib/components/Apps/components/LiveChat/index.svelte @@ -1,5 +1,4 @@
-
+
{ - handleAppClick; + handleAppClick(); $apps.dropdown = !$apps.dropdown; }} > diff --git a/src/lib/components/ComingSoon/index.svelte b/src/lib/components/ComingSoon/index.svelte index 2c86445a..fc7a8aeb 100644 --- a/src/lib/components/ComingSoon/index.svelte +++ b/src/lib/components/ComingSoon/index.svelte @@ -3,7 +3,7 @@

{label}

diff --git a/src/lib/components/Course/components/Lesson/AddLessonModal.svelte b/src/lib/components/Course/components/Lesson/AddLessonModal.svelte index 00befa9d..b09fc2c5 100644 --- a/src/lib/components/Course/components/Lesson/AddLessonModal.svelte +++ b/src/lib/components/Course/components/Lesson/AddLessonModal.svelte @@ -117,7 +117,11 @@
- +
diff --git a/src/lib/components/Course/components/Lesson/Exercises/NewExerciseModal.svelte b/src/lib/components/Course/components/Lesson/Exercises/NewExerciseModal.svelte new file mode 100644 index 00000000..2e1c0cd0 --- /dev/null +++ b/src/lib/components/Course/components/Lesson/Exercises/NewExerciseModal.svelte @@ -0,0 +1,196 @@ + + + + {#if step === 0} +
+

How do you want to create your exercise?

+ +
+ {#each options as option} + + {/each} +
+ +
+ +
+
+ {:else if step === 1} + {#if type === Type.SCRATCH} +
+
+

Give your exercise a title

+ + +
+ +
+
+
+ {:else if type === Type.TEMPLATE} +
+

Select a template

+ +
+
+ {#each tags as tag} + { + selectedTag = tag; + selectedTemplateId = ''; + }}>{tag} + {/each} +
+ +
+ {#each TEMPLATES[selectedTag] as template} + + {/each} +
+ +
+ { + isTemplateFinishedLoading = true; + const template = TEMPLATES[selectedTag].find((t) => t.id === selectedTemplateId); + if (!template) return; + + console.log('Selected template', template); + await handleTemplateCreate(template.data); + isTemplateFinishedLoading = true; + }} + /> +
+
+
+ {/if} + +
+ {/if} + diff --git a/src/lib/components/Course/components/Lesson/Exercises/index.svelte b/src/lib/components/Course/components/Lesson/Exercises/index.svelte index a512d33c..46b6d7cb 100644 --- a/src/lib/components/Course/components/Lesson/Exercises/index.svelte +++ b/src/lib/components/Course/components/Lesson/Exercises/index.svelte @@ -1,4 +1,4 @@ -