Skip to content

Commit 3409049

Browse files
authored
Merge pull request #1576 from frappe/develop
chore: merge 'develop' into 'main'
2 parents 5212122 + 00993da commit 3409049

24 files changed

Lines changed: 811 additions & 610 deletions

frontend/components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ declare module 'vue' {
8383
QuizBlock: typeof import('./src/components/QuizBlock.vue')['default']
8484
QuizInVideo: typeof import('./src/components/Modals/QuizInVideo.vue')['default']
8585
Rating: typeof import('./src/components/Controls/Rating.vue')['default']
86+
RelatedCourses: typeof import('./src/components/RelatedCourses.vue')['default']
8687
ReviewModal: typeof import('./src/components/Modals/ReviewModal.vue')['default']
8788
RouterLink: typeof import('vue-router')['RouterLink']
8889
RouterView: typeof import('vue-router')['RouterView']

frontend/src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<FrappeUIProvider>
33
<Layout>
4-
<router-view />
4+
<div class="text-base">
5+
<router-view />
6+
</div>
57
</Layout>
68
<Dialogs />
79
</FrappeUIProvider>

frontend/src/components/AppSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ import {
191191
h,
192192
onUnmounted,
193193
} from 'vue'
194-
import { getSidebarLinks } from '../utils'
194+
import { getSidebarLinks } from '@/utils'
195195
import { usersStore } from '@/stores/user'
196196
import { sessionStore } from '@/stores/session'
197197
import { useSidebar } from '@/stores/sidebar'

frontend/src/components/BatchCard.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@
7070
</div>
7171
</template>
7272
<script setup>
73-
import { Badge } from 'frappe-ui'
74-
import { formatTime } from '../utils'
75-
import { Clock, BookOpen, Globe } from 'lucide-vue-next'
73+
import { formatTime } from '@/utils'
74+
import { Clock, Globe } from 'lucide-vue-next'
7675
import DateRange from '@/components/Common/DateRange.vue'
7776
import CourseInstructors from '@/components/CourseInstructors.vue'
7877
import UserAvatar from '@/components/UserAvatar.vue'

frontend/src/components/CourseOutline.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
</template>
149149
<script setup>
150150
import { Button, createResource, Tooltip, toast } from 'frappe-ui'
151-
import { getCurrentInstance, inject, ref } from 'vue'
151+
import { getCurrentInstance, inject, ref, watch } from 'vue'
152152
import Draggable from 'vuedraggable'
153153
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'
154154
import {
@@ -197,13 +197,22 @@ const props = defineProps({
197197
const outline = createResource({
198198
url: 'lms.lms.utils.get_course_outline',
199199
cache: ['course_outline', props.courseName],
200-
params: {
201-
course: props.courseName,
202-
progress: props.getProgress,
200+
makeParams() {
201+
return {
202+
course: props.courseName,
203+
progress: props.getProgress,
204+
}
203205
},
204206
auto: true,
205207
})
206208
209+
watch(
210+
() => props.courseName,
211+
() => {
212+
outline.reload()
213+
}
214+
)
215+
207216
const deleteLesson = createResource({
208217
url: 'lms.lms.api.delete_lesson',
209218
makeParams(values) {

frontend/src/components/CourseReviews.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<script setup>
6565
import { Star } from 'lucide-vue-next'
6666
import { createResource, Button } from 'frappe-ui'
67-
import { computed, ref, inject } from 'vue'
67+
import { watch, ref, inject } from 'vue'
6868
import UserAvatar from '@/components/UserAvatar.vue'
6969
import ReviewModal from '@/components/Modals/ReviewModal.vue'
7070
@@ -101,12 +101,21 @@ const hasReviewed = createResource({
101101
const reviews = createResource({
102102
url: 'lms.lms.utils.get_reviews',
103103
cache: ['course_reviews', props.courseName],
104-
params: {
105-
course: props.courseName,
104+
makeParams() {
105+
return {
106+
course: props.courseName,
107+
}
106108
},
107109
auto: true,
108110
})
109111
112+
watch(
113+
() => props.courseName,
114+
() => {
115+
reviews.reload()
116+
}
117+
)
118+
110119
const showReviewModal = ref(false)
111120
112121
function openReviewModal() {

frontend/src/components/DiscussionReplies.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</template>
9595
<script setup>
9696
import { createResource, TextEditor, Button, Dropdown, toast } from 'frappe-ui'
97-
import { timeAgo } from '../utils'
97+
import { timeAgo } from '@/utils'
9898
import UserAvatar from '@/components/UserAvatar.vue'
9999
import { ChevronLeft, MoreHorizontal } from 'lucide-vue-next'
100100
import { ref, inject, onMounted, onUnmounted } from 'vue'

frontend/src/components/Discussions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<script setup>
7070
import { createResource, Button } from 'frappe-ui'
7171
import UserAvatar from '@/components/UserAvatar.vue'
72-
import { singularize, timeAgo } from '../utils'
72+
import { singularize, timeAgo } from '@/utils'
7373
import { ref, onMounted, inject, onUnmounted } from 'vue'
7474
import DiscussionReplies from '@/components/DiscussionReplies.vue'
7575
import DiscussionModal from '@/components/Modals/DiscussionModal.vue'

frontend/src/components/MobileLayout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</div>
5555
</template>
5656
<script setup>
57-
import { getSidebarLinks } from '../utils'
57+
import { getSidebarLinks } from '@/utils'
5858
import { useRouter } from 'vue-router'
5959
import { watch, ref, onMounted } from 'vue'
6060
import { sessionStore } from '@/stores/session'

frontend/src/components/Modals/LiveClassAttendance.vue

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,59 @@
33
v-model="show"
44
:options="{
55
title: __('Attendance for Class - {0}').format(live_class?.title),
6-
size: 'xl',
6+
size: '4xl',
77
}"
88
>
99
<template #body-content>
10-
<div class="space-y-5">
10+
<div
11+
class="grid grid-cols-2 gap-12 text-sm font-semibold text-ink-gray-5 pb-2"
12+
>
13+
<div>
14+
{{ __('Member') }}
15+
</div>
16+
<div class="grid grid-cols-3 gap-20">
17+
<div>
18+
{{ __('Joined at') }}
19+
</div>
20+
<div class="text-center">
21+
{{ __('Left at') }}
22+
</div>
23+
<div>
24+
{{ __('Attended for') }}
25+
</div>
26+
</div>
27+
</div>
28+
<div class="divide-y text-base">
1129
<div
1230
v-for="participant in participants.data"
1331
@click="redirectToProfile(participant.member_username)"
14-
class="cursor-pointer text-base w-fit"
32+
class="grid grid-cols-2 items-center w-full text-base w-fit py-2"
1533
>
16-
<Tooltip placement="right">
17-
<div class="flex items-center space-x-2">
18-
<Avatar
19-
:image="participant.member_image"
20-
:label="participant.member_name"
21-
size="xl"
22-
/>
23-
<div class="space-y-1">
24-
<div class="font-medium">
25-
{{ participant.member_name }}
26-
</div>
27-
<div>
28-
{{ participant.member }}
29-
</div>
34+
<div class="flex items-center space-x-2">
35+
<Avatar
36+
:image="participant.member_image"
37+
:label="participant.member_name"
38+
size="xl"
39+
/>
40+
<div class="space-y-1">
41+
<div class="font-medium">
42+
{{ participant.member_name }}
3043
</div>
31-
</div>
32-
<template #body>
33-
<div
34-
class="max-w-[30ch] rounded bg-surface-gray-7 px-2 py-1 text-p-xs text-ink-white leading-5 shadow-xl"
35-
>
36-
{{ dayjs(participant.joined_at).format('HH:mm a') }} -
37-
{{ dayjs(participant.left_at).format('HH:mm a') }}
38-
<br />
39-
{{ __('attended for') }} {{ participant.duration }}
40-
{{ __('minutes') }}
44+
<div>
45+
{{ participant.member }}
4146
</div>
42-
</template>
43-
</Tooltip>
47+
</div>
48+
</div>
49+
50+
<div class="grid grid-cols-3 gap-20 text-right">
51+
<div>
52+
{{ dayjs(participant.joined_at).format('HH:mm a') }}
53+
</div>
54+
<div>
55+
{{ dayjs(participant.left_at).format('HH:mm a') }}
56+
</div>
57+
<div>{{ participant.duration }} {{ __('minutes') }}</div>
58+
</div>
4459
</div>
4560
</div>
4661
</template>

0 commit comments

Comments
 (0)