fix: misc lesson issues

This commit is contained in:
Jannat Patel
2024-04-25 16:41:56 +05:30
parent 804fc8e391
commit 1a2cb0fc3c
9 changed files with 1013 additions and 806 deletions

View File

@@ -2,9 +2,9 @@
<div class="text-base">
<div
v-if="title && (outline.data?.length || allowEdit)"
class="flex items-center justify-between mb-4"
class="flex items-center justify-between mb-4 pl-2"
>
<div class="font-semibold" :class="allowEdit ? 'text-base' : 'text-lg'">
<div class="font-semibold text-lg">
{{ __(title) }}
</div>
<Button size="sm" v-if="allowEdit" @click="openChapterModal()">
@@ -73,7 +73,7 @@
</router-link>
</div>
</div>
<div v-if="allowEdit" class="flex mt-2 pl-8">
<div v-if="allowEdit" class="flex mt-2 mb-4 pl-8">
<router-link
:to="{
name: 'CreateLesson',

View File

@@ -24,7 +24,12 @@
<Quiz :quiz="getId(block)" />
</div>
<div v-else-if="block.includes('{{ Video')">
<video controls width="100%" controlsList="nodownload">
<video
controls
width="100%"
controlsList="nodownload"
oncontextmenu="return false;"
>
<source :src="getId(block)" type="video/mp4" />
</video>
</div>

View File

@@ -16,6 +16,7 @@
muted
width="100%"
controlsList="nodownload"
oncontextmenu="return false;"
class="rounded-sm"
>
<source src="/Youtube.mov" type="video/mp4" />

View File

@@ -165,7 +165,7 @@
</div>
</div>
</div>
<div class="border-l px-5 pt-5">
<div class="border-l pt-5">
<!-- <CreateOutline v-if="courseResource.doc" :course="courseResource.doc"/> -->
<CourseOutline
v-if="courseResource.data"
@@ -220,7 +220,7 @@ const course = reactive({
})
onMounted(() => {
if (!user.data?.is_moderator || !user.data?.is_instructor) {
if (!user.data?.is_moderator && !user.data?.is_instructor) {
router.push({ name: 'Courses' })
}
if (props.courseName !== 'new') {

View File

@@ -114,6 +114,7 @@ const renderEditor = (holder) => {
return new EditorJS({
holder: holder,
tools: getEditorTools(),
autofocus: true,
})
}

View File

@@ -151,7 +151,7 @@
</div>
</div>
<div class="sticky top-10">
<div class="bg-gray-50 p-5 border-b">
<div class="bg-gray-50 py-5 pl-2 border-b">
<div class="text-lg font-semibold">
{{ lesson.data.course_title }}
</div>
@@ -381,10 +381,6 @@ const allowInstructorContent = () => {
font-weight: 500;
}
.codex-editor__redactor {
padding-bottom: 0 !important;
}
.embed-tool__caption {
display: none;
}

View File

@@ -137,6 +137,9 @@ export function getEditorTools() {
paragraph: {
class: Paragraph,
inlineToolbar: true,
config: {
preserveBlank: true,
},
},
codeBox: {
class: CodeBox,

View File

@@ -16,7 +16,7 @@ export class Upload {
renderUpload(file) {
if (this.isVideo(file.file_type)) {
return `<video controls width='100%' controlsList='nodownload' class="mb-4">
return `<video controls width='100%' controlsList='nodownload' class="mb-4" oncontextmenu="return false;">
<source src=${encodeURI(file.file_url)} type='video/mp4'>
</video>`
} else if (this.isAudio(file.file_type)) {

File diff suppressed because it is too large Load Diff