Merge pull request #1303 from frappe/develop

chore: merge 'develop' into 'main'
This commit is contained in:
Jannat Patel
2025-02-14 18:07:10 +05:30
committed by GitHub
192 changed files with 7507 additions and 4522 deletions

View File

@@ -25,7 +25,7 @@
"codemirror-editor-vue3": "^2.8.0",
"dayjs": "^1.11.6",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.89",
"frappe-ui": "^0.1.109",
"lucide-vue-next": "^0.383.0",
"markdown-it": "^14.0.0",
"pinia": "^2.0.33",

View File

@@ -5,7 +5,7 @@
<div class="flex items-center justify-between mb-2">
<div class="flex items-center">
<Avatar :label="comm.sender_full_name" size="lg" />
<div class="ml-2">
<div class="ml-2 text-ink-gray-7">
{{ comm.sender_full_name }}
</div>
</div>
@@ -14,13 +14,13 @@
</div>
</div>
<div
class="prose prose-sm bg-gray-50 !min-w-full px-4 py-2 rounded-md"
class="prose prose-sm bg-surface-menu-bar !min-w-full px-4 py-2 rounded-md"
v-html="comm.content"
></div>
</div>
</div>
</div>
<div v-else class="text-sm italic text-gray-600">
<div v-else class="text-sm italic text-ink-gray-5">
{{ __('No announcements') }}
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div
class="flex h-full flex-col justify-between transition-all duration-300 ease-in-out bg-gray-50"
class="flex h-full flex-col justify-between transition-all duration-300 ease-in-out border-r bg-surface-menu-bar"
:class="sidebarStore.isSidebarCollapsed ? 'w-14' : 'w-56'"
>
<div
@@ -23,16 +23,16 @@
<div
class="flex items-center justify-between pr-2 cursor-pointer"
:class="sidebarStore.isSidebarCollapsed ? 'pl-3' : 'pl-4'"
@click="showWebPages = !showWebPages"
@click="toggleWebPages"
>
<div
v-if="!sidebarStore.isSidebarCollapsed"
class="flex items-center text-sm text-gray-600 my-1"
class="flex items-center text-sm text-ink-gray-5 my-1"
>
<span class="grid h-5 w-6 flex-shrink-0 place-items-center">
<ChevronRight
class="h-4 w-4 stroke-1.5 text-gray-900 transition-all duration-300 ease-in-out"
:class="{ 'rotate-90': showWebPages }"
class="h-4 w-4 stroke-1.5 text-ink-gray-9 transition-all duration-300 ease-in-out"
:class="{ 'rotate-90': !sidebarStore.isWebpagesCollapsed }"
/>
</span>
<span class="ml-2">
@@ -41,14 +41,14 @@
</div>
<Button v-if="isModerator" variant="ghost" @click="openPageModal()">
<template #icon>
<Plus class="h-4 w-4 text-gray-700 stroke-1.5" />
<Plus class="h-4 w-4 text-ink-gray-7 stroke-1.5" />
</template>
</Button>
</div>
<div
v-if="sidebarSettings.data?.web_pages?.length"
class="flex flex-col transition-all duration-300 ease-in-out"
:class="showWebPages ? 'block' : 'hidden'"
:class="!sidebarStore.isWebpagesCollapsed ? 'block' : 'hidden'"
>
<SidebarLink
v-for="link in sidebarSettings.data.web_pages"
@@ -73,7 +73,7 @@
<template #icon>
<span class="grid h-5 w-6 flex-shrink-0 place-items-center">
<CollapseSidebar
class="h-4.5 w-4.5 text-gray-700 duration-300 ease-in-out"
class="h-4.5 w-4.5 text-ink-gray-7 duration-300 ease-in-out"
:class="{
'[transform:rotateY(180deg)]': sidebarStore.isSidebarCollapsed,
}"
@@ -114,7 +114,6 @@ const showPageModal = ref(false)
const isModerator = ref(false)
const isInstructor = ref(false)
const pageToEdit = ref(null)
const showWebPages = ref(false)
const settingsStore = useSettings()
onMounted(() => {
@@ -266,5 +265,17 @@ watch(userResource, () => {
const toggleSidebar = () => {
sidebarStore.isSidebarCollapsed = !sidebarStore.isSidebarCollapsed
localStorage.setItem(
'isSidebarCollapsed',
JSON.stringify(sidebarStore.isSidebarCollapsed)
)
}
const toggleWebPages = () => {
sidebarStore.isWebpagesCollapsed = !sidebarStore.isWebpagesCollapsed
localStorage.setItem(
'isWebpagesCollapsed',
JSON.stringify(sidebarStore.isWebpagesCollapsed)
)
}
</script>

View File

@@ -3,7 +3,7 @@
<template #target="{ togglePopover }">
<button
:class="[
'group w-full flex h-7 items-center justify-between rounded px-2 text-base text-gray-800 hover:bg-gray-100',
'group w-full flex h-7 items-center justify-between rounded px-2 text-base text-ink-gray-8 hover:bg-surface-gray-2',
]"
@click.prevent="togglePopover()"
>
@@ -18,15 +18,15 @@
</template>
<template #body>
<div
class="grid grid-cols-3 justify-between mx-3 p-2 rounded-lg border border-gray-100 bg-white shadow-xl"
class="grid grid-cols-3 justify-between mx-3 p-2 rounded-lg border border-gray-100 bg-surface-white shadow-xl"
>
<div v-for="app in apps.data" key="name">
<a
:href="app.route"
class="flex flex-col gap-1.5 rounded justify-center items-center py-2 px-3 hover:bg-gray-100"
class="flex flex-col gap-1.5 rounded justify-center items-center py-2 px-3 hover:bg-surface-gray-2"
>
<img class="size-8" :src="app.logo" />
<div class="text-sm" @click="app.onClick">
<div class="text-sm text-ink-gray-7" @click="app.onClick">
{{ app.title }}
</div>
</a>

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex items-center justify-between mb-4">
<div class="text-lg font-semibold">
<div class="text-lg font-semibold text-ink-gray-9">
{{ __('Assessments') }}
</div>
<Button v-if="canSeeAddButton()" @click="showModal = true">
@@ -23,7 +23,7 @@
}"
>
<ListHeader
class="mb-2 grid items-center space-x-4 rounded bg-gray-100 p-2"
class="mb-2 grid items-center space-x-4 rounded bg-surface-gray-2 p-2"
>
<ListHeaderItem :item="item" v-for="item in getAssessmentColumns()">
<template #prefix="{ item }">
@@ -71,7 +71,7 @@
</ListSelectBanner>
</ListView>
</div>
<div v-else class="text-sm italic text-gray-600">
<div v-else class="text-sm italic text-ink-gray-5">
{{ __('No Assessments') }}
</div>
</div>

View File

@@ -5,7 +5,7 @@
:class="{ 'border rounded-lg': !showTitle }"
>
<div class="border-r p-5 overflow-y-auto h-[calc(100vh-3.2rem)]">
<div v-if="showTitle" class="text-lg font-semibold mb-5">
<div v-if="showTitle" class="text-lg font-semibold mb-5 text-ink-gray-9">
<div v-if="submissionName === 'new'">
{{ __('Submission by') }} {{ user.data?.full_name }}
</div>
@@ -13,19 +13,19 @@
{{ __('Submission by') }} {{ submissionResource.doc?.member_name }}
</div>
</div>
<div class="text-sm text-gray-600 font-medium mb-2">
<div class="text-sm text-ink-gray-7 font-medium mb-2">
{{ __('Question') }}:
</div>
<div
v-html="assignment.data.question"
class="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-gray-300 prose-th:border-gray-300 prose-td:relative prose-th:relative prose-th:bg-gray-100 prose-sm max-w-none !whitespace-normal"
class="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-outline-gray-2 prose-th:border-outline-gray-2 prose-td:relative prose-th:relative prose-th:bg-surface-gray-2 prose-sm max-w-none !whitespace-normal"
></div>
</div>
<div class="flex flex-col">
<div class="p-5">
<div class="flex items-center justify-between mb-4">
<div class="font-semibold">
<div class="font-semibold text-ink-gray-9">
{{ __('Submission') }}
</div>
<div class="flex items-center space-x-2">
@@ -50,7 +50,7 @@
!['Pass', 'Fail'].includes(submissionResource.doc?.status) &&
submissionResource.doc?.owner == user.data?.name
"
class="bg-blue-100 p-3 rounded-md leading-5 text-sm mb-4"
class="bg-surface-blue-2 p-3 rounded-md leading-5 text-sm mb-4"
>
{{ __("You've successfully submitted the assignment.") }}
{{
@@ -61,7 +61,7 @@
{{ __('Feel free to make edits to your submission if needed.') }}
</div>
<div v-if="showUploader()">
<div class="text-xs text-gray-600 mt-1 mb-2">
<div class="text-xs text-ink-gray-5 mt-1 mb-2">
{{ __('Add your assignment as {0}').format(assignment.data.type) }}
</div>
<FileUploader
@@ -81,9 +81,9 @@
</template>
</FileUploader>
<div v-else>
<div class="flex items-center">
<div class="flex items-center text-ink-gray-7">
<div class="border rounded-md p-2 mr-2">
<FileText class="h-5 w-5 stroke-1.5 text-gray-700" />
<FileText class="h-5 w-5 stroke-1.5" />
</div>
<a
:href="submissionFile.file_url"
@@ -93,20 +93,20 @@
<span>
{{ submissionFile.file_name }}
</span>
<span class="text-sm text-gray-500 mt-1">
<span class="text-sm text-ink-gray-5 mt-1">
{{ getFileSize(submissionFile.file_size) }}
</span>
</a>
<X
v-if="canModifyAssignment"
@click="removeSubmission()"
class="bg-gray-200 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
class="bg-surface-gray-3 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
/>
</div>
</div>
</div>
<div v-else-if="assignment.data.type == 'URL'">
<div class="text-xs text-gray-600 mb-1">
<div class="text-xs text-ink-gray-5 mb-1">
{{ __('Enter a URL') }}
</div>
<FormControl
@@ -124,7 +124,7 @@
@change="(val) => (answer = val)"
:editable="true"
:fixedMenu="true"
editorClass="prose-sm max-w-none border-b border-x bg-gray-100 rounded-b-md py-1 px-2 min-h-[7rem]"
editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem]"
/>
</div>
@@ -133,9 +133,9 @@
user.data?.name == submissionResource.doc?.owner &&
submissionResource.doc?.comments
"
class="mt-8 p-3 bg-blue-100 rounded-md"
class="mt-8 p-3 bg-surface-blue-2 rounded-md"
>
<div class="text-sm text-gray-600 font-medium mb-2">
<div class="text-sm text-ink-gray-5 font-medium mb-2">
{{ __('Comments by Evaluator') }}:
</div>
<div class="leading-5">
@@ -145,7 +145,7 @@
<!-- Grading -->
<div v-if="canGradeSubmission" class="mt-8 space-y-4">
<div class="font-semibold mb-2">
<div class="font-semibold mb-2 text-ink-gray-9">
{{ __('Grading') }}
</div>
<FormControl
@@ -281,7 +281,6 @@ watch(submissionResource, () => {
if (submissionResource.doc.answer) {
answer.value = submissionResource.doc.answer
}
if (submissionResource.isDirty) {
isDirty.value = true
} else if (showUploader() && !submissionFile.value) {
@@ -309,6 +308,7 @@ const submitAssignment = () => {
submissionResource.setValue.submit(
{
...submissionResource.doc,
assignment_attachment: submissionFile.value?.file_url,
evaluator: evaluator,
},
{
@@ -351,6 +351,7 @@ const addNewSubmission = () => {
}
const saveSubmission = (file) => {
isDirty.value = true
submissionFile.value = file
}
@@ -401,6 +402,7 @@ const validateFile = (file) => {
}
const removeSubmission = () => {
isDirty.value = true
submissionFile.value = null
}

View File

@@ -9,8 +9,8 @@
<div class="flex items-center space-x-2 shadow rounded-lg p-1 w-1/2">
<Button variant="ghost" @click="togglePlay">
<template #icon>
<Play v-if="!isPlaying" class="w-4 h-4 text-gray-900" />
<Pause v-else class="w-4 h-4 text-gray-900" />
<Play v-if="!isPlaying" class="w-4 h-4 text-ink-gray-9" />
<Pause v-else class="w-4 h-4 text-ink-gray-9" />
</template>
</Button>
<input
@@ -22,13 +22,13 @@
@input="changeCurrentTime"
class="duration-slider w-full h-1"
/>
<span class="text-xs text-gray-900 font-medium">
<span class="text-xs text-ink-gray-9 font-medium">
{{ formatTime(currentTime) }} / {{ formatTime(duration) }}
</span>
<Button variant="ghost" @click="toggleMute">
<template #icon>
<Volume2 v-if="!isMuted" class="w-4 h-4 text-gray-900" />
<VolumeX v-else class="w-4 h-4 text-gray-900" />
<Volume2 v-if="!isMuted" class="w-4 h-4 text-ink-gray-9" />
<VolumeX v-else class="w-4 h-4 text-ink-gray-9" />
</template>
</Button>
</div>

View File

@@ -1,50 +1,52 @@
<template>
<div
class="flex flex-col shadow hover:bg-gray-100 rounded-md p-4 h-full"
class="flex flex-col border-2 hover:bg-surface-gray-2 rounded-md p-4 h-full"
style="min-height: 150px"
>
<div class="text-lg leading-5 font-semibold mb-2">
<div class="text-lg leading-5 font-semibold mb-2 text-ink-gray-9">
{{ batch.title }}
</div>
<Badge
<div
v-if="batch.seat_count && batch.seats_left > 0"
theme="green"
class="self-start mb-2"
class="text-xs bg-green-100 text-green-700 self-start px-2 py-0.5 rounded-md"
>
{{ batch.seats_left }}
<span v-if="batch.seats_left > 1">{{ __('Seats Left') }}</span
><span v-else-if="batch.seats_left == 1">{{ __('Seat Left') }}</span>
</Badge>
<Badge
<span v-if="batch.seats_left > 1">
{{ __('Seats Left') }}
</span>
<span v-else-if="batch.seats_left == 1">
{{ __('Seat Left') }}
</span>
</div>
<div
v-else-if="batch.seat_count && batch.seats_left <= 0"
theme="red"
class="self-start mb-2"
class="text-xs bg-red-100 text-red-700 self-start px-2 py-0.5 rounded-md"
>
{{ __('Sold Out') }}
</Badge>
<div class="short-introduction text-sm text-gray-700">
</div>
<div class="short-introduction text-sm text-ink-gray-7">
{{ batch.description }}
</div>
<div v-if="batch.amount" class="font-semibold mb-4">
<div v-if="batch.amount" class="font-semibold text-ink-gray-9 mb-4">
{{ batch.price }}
</div>
<div class="flex flex-col space-y-2 mt-auto">
<DateRange
:startDate="batch.start_date"
:endDate="batch.end_date"
class="text-sm text-gray-700"
class="text-sm text-ink-gray-7"
/>
<div class="flex items-center text-sm text-gray-700">
<Clock class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<div class="flex items-center text-sm text-ink-gray-7">
<Clock class="h-4 w-4 stroke-1.5 mr-2 text-ink-gray-7" />
<span>
{{ formatTime(batch.start_time) }} - {{ formatTime(batch.end_time) }}
</span>
</div>
<div
v-if="batch.timezone"
class="flex items-center text-sm text-gray-700"
class="flex items-center text-sm text-ink-gray-7"
>
<Globe class="h-4 w-4 stroke-1.5 mr-2 text-gray-600" />
<Globe class="h-4 w-4 stroke-1.5 mr-2 text-ink-gray-5" />
<span>
{{ batch.timezone }}
</span>

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex items-center justify-between mb-4">
<div class="text-lg font-semibold">
<div class="text-lg font-semibold text-ink-gray-9">
{{ __('Courses') }}
</div>
<Button v-if="canSeeAddButton()" @click="openCourseModal()">
@@ -18,6 +18,7 @@
row-key="batch_course"
:options="{
showTooltip: false,
selectable: user.data?.is_student ? false : true,
getRowRoute: (row) => ({
name: 'CourseDetail',
params: { courseName: row.name },
@@ -25,7 +26,7 @@
}"
>
<ListHeader
class="mb-2 grid items-center space-x-4 rounded bg-gray-100 p-2"
class="mb-2 grid items-center space-x-4 rounded bg-surface-gray-2 p-2"
>
<ListHeaderItem :item="item" v-for="item in getCoursesColumns()">
<template #prefix="{ item }">

View File

@@ -2,7 +2,7 @@
<div v-if="user.data?.is_student">
<div
v-if="feedbackList.data?.length"
class="bg-blue-100 text-blue-700 p-2 rounded-md mb-5"
class="bg-surface-blue-2 text-blue-700 p-2 rounded-md mb-5"
>
{{ __('Thank you for providing your feedback!') }}
</div>
@@ -61,13 +61,13 @@
}"
>
<ListHeader
class="mb-2 grid items-center space-x-4 rounded bg-gray-100 p-2"
class="mb-2 grid items-center space-x-4 rounded bg-surface-gray-2 p-2"
></ListHeader>
<ListRows>
<ListRow
:row="row"
v-for="row in feedbackList.data"
class="group cursor-pointer"
class="group cursor-pointer feedback-list"
>
<template #default="{ column, item }">
<ListRowItem
@@ -78,7 +78,7 @@
<template #prefix>
<div v-if="column.key == 'member_name'">
<Avatar
class="flex items-center"
class="flex"
:image="row['member_image']"
:label="item"
size="sm"
@@ -97,7 +97,7 @@
</ListRows>
</ListView>
</div>
<div v-else class="text-sm italic text-center text-gray-700 mt-5">
<div v-else class="text-sm italic text-center text-ink-gray-7 mt-5">
{{ __('No feedback received yet.') }}
</div>
</template>
@@ -237,3 +237,9 @@ const feedbackColumns = computed(() => {
]
})
</script>
<style>
.feedback-list > button > div {
align-items: start;
padding: 0.15rem 0;
}
</style>

View File

@@ -1,25 +1,31 @@
<template>
<div v-if="batch.data" class="shadow rounded-md p-5 lg:w-72">
<Badge
<div v-if="batch.data" class="border-2 rounded-md p-5 lg:w-72">
<div
v-if="batch.data.seat_count && seats_left > 0"
theme="green"
class="self-start mb-2 float-right"
class="text-xs bg-green-200 text-green-800 float-right px-2 py-0.5 rounded-md"
>
{{ seats_left }} <span v-if="seats_left > 1">{{ __('Seats Left') }}</span
><span v-else-if="seats_left == 1">{{ __('Seat Left') }}</span>
</Badge>
<Badge
{{ seats_left }}
<span v-if="seats_left > 1">
{{ __('Seats Left') }}
</span>
<span v-else-if="seats_left == 1">
{{ __('Seat Left') }}
</span>
</div>
<div
v-else-if="batch.data.seat_count && seats_left <= 0"
theme="red"
class="self-start mb-2 float-right"
class="text-xs bg-red-200 text-red-900 float-right px-2 py-0.5 rounded-md"
>
{{ __('Sold Out') }}
</Badge>
<div v-if="batch.data.amount" class="text-lg font-semibold mb-3">
</div>
<div
v-if="batch.data.amount"
class="text-lg font-semibold mb-3 text-ink-gray-9"
>
{{ formatNumberIntoCurrency(batch.data.amount, batch.data.currency) }}
</div>
<div class="flex items-center mb-3">
<BookOpen class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<div class="flex items-center mb-3 text-ink-gray-7">
<BookOpen class="h-4 w-4 stroke-1.5 mr-2" />
<span> {{ batch.data.courses.length }} {{ __('Courses') }} </span>
</div>
<DateRange
@@ -27,15 +33,15 @@
:endDate="batch.data.end_date"
class="mb-3"
/>
<div class="flex items-center mb-3">
<Clock class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<div class="flex items-center mb-3 text-ink-gray-7">
<Clock class="h-4 w-4 stroke-1.5 mr-2" />
<span>
{{ formatTime(batch.data.start_time) }} -
{{ formatTime(batch.data.end_time) }}
</span>
</div>
<div v-if="batch.data.timezone" class="flex items-center">
<Globe class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<div v-if="batch.data.timezone" class="flex items-center text-ink-gray-7">
<Globe class="h-4 w-4 stroke-1.5 mr-2" />
<span>
{{ batch.data.timezone }}
</span>

View File

@@ -1,65 +1,87 @@
<template>
<div class="">
<div class="w-full flex items-center justify-between pb-4">
<div class="font-medium text-gray-600">
<div class="font-medium text-ink-gray-7">
{{ __('Statistics') }}
</div>
</div>
<div class="grid grid-cols-3 gap-5 mb-8">
<div class="flex items-center shadow py-2 px-3 rounded-md">
<div class="p-2 rounded-md bg-gray-100 mr-3">
<User class="w-5 h-5 stroke-1.5 text-gray-700" />
<div class="grid grid-cols-4 gap-5 mb-8">
<div
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
>
<div class="p-2 rounded-md bg-surface-gray-2 mr-3">
<User class="w-5 h-5 stroke-1.5" />
</div>
<div class="flex items-center space-x-2">
<span class="font-semibold">
{{ students.data?.length }}
</span>
<span class="text-gray-700">
<span class="">
{{ __('Students') }}
</span>
</div>
</div>
<div class="flex items-center shadow py-2 px-3 rounded-md">
<div class="p-2 rounded-md bg-gray-100 mr-3">
<BookOpen class="w-5 h-5 stroke-1.5 text-gray-700" />
<div
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
>
<div class="p-2 rounded-md bg-surface-gray-2 mr-3">
<GraduationCap class="w-5 h-5 stroke-1.5" />
</div>
<div class="flex items-center space-x-2">
<span class="font-semibold">
{{ certificationCount.data }}
</span>
<span class="">
{{ __('Certified') }}
</span>
</div>
</div>
<div
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
>
<div class="p-2 rounded-md bg-surface-gray-2 mr-3">
<BookOpen class="w-5 h-5 stroke-1.5" />
</div>
<div class="flex items-center space-x-2">
<span class="font-semibold">
{{ batch.courses?.length }}
</span>
<span class="text-gray-700">
<span>
{{ __('Courses') }}
</span>
</div>
</div>
<div class="flex items-center shadow py-2 px-3 rounded-md">
<div class="p-2 rounded-md bg-gray-100 mr-3">
<ShieldCheck class="w-5 h-5 stroke-1.5 text-gray-700" />
<div
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
>
<div class="p-2 rounded-md bg-surface-gray-2 mr-3">
<ShieldCheck class="w-5 h-5 stroke-1.5" />
</div>
<div class="flex items-center space-x-2">
<span class="font-semibold">
{{ assessmentCount }}
</span>
<span class="text-gray-700">
<span>
{{ __('Assessments') }}
</span>
</div>
</div>
</div>
<div v-if="showProgressChart" class="mb-8">
<div class="text-gray-600 font-medium">
<div class="text-ink-gray-7 font-medium">
{{ __('Progress') }}
</div>
<ApexChart
:options="chartOptions"
:series="chartData"
type="bar"
height="200"
:height="chartData[0].data.length * 30 + 100"
/>
<div
class="flex items-center justify-center text-sm text-gray-700 space-x-4"
class="flex items-center justify-center text-sm text-ink-gray-7 space-x-4"
>
<div class="flex items-center space-x-2">
<div
@@ -85,7 +107,7 @@
<div>
<div class="flex items-center justify-between mb-4">
<div class="text-gray-600 font-medium">
<div class="text-ink-gray-7 font-medium">
{{ __('Students') }}
</div>
<Button @click="openStudentModal()">
@@ -106,7 +128,7 @@
}"
>
<ListHeader
class="mb-2 grid items-center space-x-4 rounded bg-gray-100 p-2"
class="mb-2 grid items-center space-x-4 rounded bg-surface-gray-2 p-2"
>
<ListHeaderItem
:item="item"
@@ -173,7 +195,7 @@
</ListSelectBanner>
</ListView>
</div>
<div v-else class="text-sm italic text-gray-600">
<div v-else class="text-sm italic text-ink-gray-5">
{{ __('There are no students in this batch.') }}
</div>
</div>
@@ -204,7 +226,7 @@ import {
} from 'frappe-ui'
import {
BookOpen,
Clipboard,
GraduationCap,
Plus,
ShieldCheck,
Trash2,
@@ -242,7 +264,7 @@ const students = createResource({
auto: true,
onSuccess(data) {
chartData.value = getChartData()
showProgressChart.value = true
showProgressChart.value = data.length && true
},
})
@@ -285,7 +307,7 @@ const deleteStudents = createResource({
url: 'lms.lms.api.delete_documents',
makeParams(values) {
return {
doctype: 'Batch Student',
doctype: 'LMS Batch Enrollment',
documents: values.students,
}
},
@@ -309,7 +331,9 @@ const removeStudents = (selections, unselectAll) => {
const getChartData = () => {
let categories = {}
Object.keys(students.data?.[0].courses).forEach((course) => {
if (!students.data?.length) return []
Object.keys(students.data[0].courses).forEach((course) => {
categories[course] = {
value: 0,
type: 'course',
@@ -333,7 +357,7 @@ const getChartData = () => {
})
Object.keys(student.assessments).forEach((assessment) => {
if (student.assessments[assessment] === 100) {
if (student.assessments[assessment].result === 'Pass') {
categories[assessment].value += 1
}
})
@@ -402,6 +426,17 @@ watch(students, () => {
assessmentCount.value = Object.keys(students.data?.[0].assessments).length
}
})
const certificationCount = createResource({
url: 'frappe.client.get_count',
params: {
doctype: 'LMS Certificate',
filters: {
batch_name: props.batch.name,
},
},
auto: true,
})
</script>
<style>
.apexcharts-legend {

View File

@@ -2,7 +2,7 @@
<div class="flex flex-col justify-between min-h-0">
<div>
<div class="flex items-center justify-between">
<div class="font-semibold mb-1">
<div class="font-semibold mb-1 text-ink-gray-9">
{{ __(label) }}
</div>
<Badge
@@ -12,7 +12,7 @@
theme="orange"
/>
</div>
<div class="text-xs text-gray-600">
<div class="text-xs text-ink-gray-5">
{{ __(description) }}
</div>
</div>

View File

@@ -1,7 +1,7 @@
<template>
<div class="flex flex-col min-h-0">
<div class="flex items-center justify-between">
<div class="text-xl font-semibold mb-1">
<div class="text-xl font-semibold mb-5 text-ink-gray-9">
{{ label }}
</div>
<Button @click="() => showCategoryForm()">
@@ -28,12 +28,12 @@
</div>
<div class="overflow-y-scroll">
<div class="text-base divide-y">
<div class="text-base divide-y space-y-2">
<FormControl
:value="cat.category"
type="text"
v-for="cat in categories.data"
class="form-control"
class=""
@change.stop="(e) => update(cat.name, e.target.value)"
/>
</div>
@@ -128,24 +128,3 @@ const update = (name, value) => {
)
}
</script>
<style>
.form-control input {
padding: 1.25rem 0;
border-color: transparent;
background: white;
}
.form-control input:focus {
outline: transparent;
background: white;
box-shadow: none;
border-color: transparent;
}
.form-control input:hover {
outline: transparent;
background: white;
box-shadow: none;
border-color: transparent;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="flex items-center">
<Calendar class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<div class="flex items-center text-ink-gray-7">
<Calendar class="h-4 w-4 stroke-1.5 mr-2" />
<span>
{{ getFormattedDateRange(props.startDate, props.endDate) }}
</span>

View File

@@ -17,7 +17,7 @@
>
{{ displayValue(selectedValue) }}
</span>
<span class="text-base leading-5 text-gray-500" v-else>
<span class="text-base leading-5 text-ink-gray-4" v-else>
{{ placeholder || '' }}
</span>
</div>
@@ -28,7 +28,9 @@
</template>
<template #body="{ isOpen }">
<div v-show="isOpen">
<div class="mt-1 rounded-lg bg-white py-1 text-base shadow-2xl">
<div
class="mt-1 rounded-lg bg-surface-white py-1 text-base shadow-2xl"
>
<div class="relative px-1.5 pt-0.5">
<ComboboxInput
ref="search"
@@ -62,7 +64,7 @@
>
<div
v-if="group.group && !group.hideLabel"
class="px-2.5 py-1.5 text-sm font-medium text-gray-500"
class="px-2.5 py-1.5 text-sm font-medium text-ink-gray-4"
>
{{ group.group }}
</div>
@@ -76,7 +78,7 @@
<li
:class="[
'flex items-center rounded px-2.5 py-2 text-base',
{ 'bg-gray-100': active },
{ 'bg-surface-gray-2': active },
]"
>
<slot
@@ -93,7 +95,7 @@
</div>
<div
v-if="option.description"
class="text-xs text-gray-700"
class="text-xs text-ink-gray-7"
v-html="option.description"
></div>
</div>
@@ -103,7 +105,7 @@
</div>
<li
v-if="groups.length == 0"
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-gray-600"
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-ink-gray-5"
>
No results found
</li>
@@ -243,7 +245,7 @@ watch(showOptions, (val) => {
})
const textColor = computed(() => {
return props.disabled ? 'text-gray-600' : 'text-gray-800'
return props.disabled ? 'text-ink-gray-5' : 'text-ink-gray-8'
})
const inputClasses = computed(() => {
@@ -264,12 +266,14 @@ const inputClasses = computed(() => {
let variant = props.disabled ? 'disabled' : props.variant
let variantClasses = {
subtle:
'border border-gray-100 bg-gray-100 placeholder-gray-500 hover:border-gray-200 hover:bg-gray-200 focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400',
'border border-gray-100 bg-surface-gray-2 placeholder-ink-gray-4 hover:border-outline-gray-modals hover:bg-surface-gray-3 focus:bg-surface-white focus:border-outline-gray-4 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3',
outline:
'border border-gray-300 bg-white placeholder-gray-500 hover:border-gray-400 hover:shadow-sm focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400',
'border border-outline-gray-2 bg-surface-white placeholder-ink-gray-4 hover:border-outline-gray-3 hover:shadow-sm focus:bg-surface-white focus:border-outline-gray-4 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3',
disabled: [
'border bg-gray-50 placeholder-gray-400',
props.variant === 'outline' ? 'border-gray-300' : 'border-transparent',
'border bg-surface-menu-bar placeholder-ink-gray-3',
props.variant === 'outline'
? 'border-outline-gray-2'
: 'border-transparent',
],
}[variant]

View File

@@ -5,7 +5,7 @@
height: height,
}"
>
<span class="text-xs" v-if="label">
<span class="text-xs text-ink-gray-7" v-if="label">
{{ label }}
</span>
<div
@@ -13,7 +13,7 @@
class="h-auto flex-1 overflow-hidden overscroll-none !rounded border border-outline-gray-2 bg-surface-gray-2 dark:bg-gray-900"
/>
<span
class="mt-1 text-xs text-gray-600"
class="mt-1 text-xs text-ink-gray-5"
v-show="description"
v-html="description"
></span>
@@ -27,7 +27,6 @@
</div>
</template>
<script setup lang="ts">
import { useDark } from '@vueuse/core'
import ace from 'ace-builds'
import 'ace-builds/src-min-noconflict/ext-searchbox'
import 'ace-builds/src-min-noconflict/theme-chrome'
@@ -35,9 +34,7 @@ import 'ace-builds/src-min-noconflict/theme-twilight'
import { PropType, onMounted, ref, watch } from 'vue'
import { Button } from 'frappe-ui'
const isDark = useDark({
attribute: 'data-theme',
})
const isDark = ref(false)
const props = defineProps({
modelValue: {
@@ -82,6 +79,7 @@ const editor = ref<HTMLElement | null>(null)
let aceEditor = null as ace.Ace.Editor | null
onMounted(() => {
isDark.value = localStorage.getItem('theme') === 'dark'
setupEditor()
})
@@ -148,6 +146,7 @@ function resetEditor(value: string, resetHistory = false) {
value = getModelValue()
aceEditor?.setValue(value)
aceEditor?.clearSelection()
console.log(isDark.value)
aceEditor?.setTheme(isDark.value ? 'ace/theme/twilight' : 'ace/theme/chrome')
props.autofocus && aceEditor?.focus()
if (resetHistory) {
@@ -156,6 +155,7 @@ function resetEditor(value: string, resetHistory = false) {
}
watch(isDark, () => {
console.log(isDark.value)
aceEditor?.setTheme(isDark.value ? 'ace/theme/twilight' : 'ace/theme/chrome')
})
@@ -175,30 +175,3 @@ watch(
defineExpose({ resetEditor })
</script>
<style scoped>
.editor .ace_editor {
height: 100%;
width: 100%;
border-radius: 5px;
overscroll-behavior: none;
}
.editor :deep(.ace_scrollbar-h) {
display: none;
}
.editor :deep(.ace_search) {
@apply dark:bg-gray-800 dark:text-gray-200;
@apply dark:border-gray-800;
}
.editor :deep(.ace_searchbtn) {
@apply dark:bg-gray-800 dark:text-gray-200;
@apply dark:border-gray-800;
}
.editor :deep(.ace_button) {
@apply dark:bg-gray-800 dark:text-gray-200;
}
.editor :deep(.ace_search_field) {
@apply dark:bg-gray-900 dark:text-gray-200;
@apply dark:border-gray-800;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="space-y-1.5">
<label class="block text-xs text-gray-600">
<label class="block text-xs text-ink-gray-5">
{{ label }}
</label>
<div class="w-full">
@@ -8,22 +8,22 @@
<template #target="{ togglePopover }">
<button
@click="openPopover(togglePopover)"
class="flex w-full items-center space-x-2 focus:outline-none bg-gray-100 rounded h-7 py-1.5 px-2 hover:bg-gray-200 focus:bg-white border border-gray-100 hover:border-gray-200 focus:border-gray-500"
class="flex w-full items-center space-x-2 focus:outline-none bg-surface-gray-2 rounded h-7 py-1.5 px-2 hover:bg-surface-gray-3 focus:bg-surface-white border border-gray-100 hover:border-outline-gray-modals focus:border-outline-gray-4"
>
<component
v-if="selectedIcon"
class="w-4 h-4 text-gray-700 stroke-1.5"
class="w-4 h-4 text-ink-gray-7 stroke-1.5"
:is="icons[selectedIcon]"
/>
<component
v-else
class="w-4 h-4 text-gray-700 stroke-1.5"
class="w-4 h-4 text-ink-gray-7 stroke-1.5"
:is="icons.Folder"
/>
<span v-if="selectedIcon">
{{ selectedIcon }}
</span>
<span v-else class="text-gray-600">
<span v-else class="text-ink-gray-5">
{{ __('Choose an icon') }}
</span>
</button>
@@ -40,7 +40,7 @@
<div v-for="(iconComponent, iconName) in filteredIcons">
<component
:is="iconComponent"
class="h-4 w-4 stroke-1.5 text-gray-700 cursor-pointer"
class="h-4 w-4 stroke-1.5 text-ink-gray-7 cursor-pointer"
@click="setIcon(iconName, close)"
/>
</div>

View File

@@ -2,7 +2,7 @@
<div class="space-y-1.5">
<label class="block" :class="labelClasses" v-if="attrs.label">
{{ attrs.label }}
<span class="text-red-500" v-if="attrs.required">*</span>
<span class="text-ink-red-3" v-if="attrs.required">*</span>
</label>
<Autocomplete
ref="autocomplete"
@@ -56,7 +56,7 @@
</div>
</template>
</Autocomplete>
<p v-if="description" class="text-sm text-gray-600">{{ description }}</p>
<p v-if="description" class="text-sm text-ink-gray-5">{{ description }}</p>
</div>
</template>
@@ -163,7 +163,7 @@ const labelClasses = computed(() => {
sm: 'text-xs',
md: 'text-base',
}[attrs.size || 'sm'],
'text-gray-600',
'text-ink-gray-5',
]
})
</script>

View File

@@ -2,7 +2,7 @@
<div>
<label class="block mb-1" :class="labelClasses" v-if="label">
{{ label }}
<span class="text-red-500" v-if="required">*</span>
<span class="text-ink-red-3" v-if="required">*</span>
</label>
<div class="grid grid-cols-3 gap-1">
<Button
@@ -41,7 +41,9 @@
</template>
<template #body="{ isOpen }">
<div v-show="isOpen">
<div class="mt-1 rounded-lg bg-white py-1 text-base shadow-2xl">
<div
class="mt-1 rounded-lg bg-surface-white py-1 text-base shadow-2xl"
>
<ComboboxOptions
class="my-1 max-h-[12rem] overflow-y-auto px-1.5"
static
@@ -55,14 +57,14 @@
<li
:class="[
'flex cursor-pointer items-center rounded px-2 py-1 text-base',
{ 'bg-gray-100': active },
{ 'bg-surface-gray-2': active },
]"
>
<div class="flex flex-col gap-1 p-1">
<div class="text-base font-medium">
{{ option.description }}
</div>
<div class="text-sm text-gray-600">
<div class="text-sm text-ink-gray-5">
{{ option.value }}
</div>
</div>
@@ -240,7 +242,7 @@ const labelClasses = computed(() => {
sm: 'text-xs',
md: 'text-base',
}[props.size || 'sm'],
'text-gray-600',
'text-ink-gray-5',
]
})
</script>

View File

@@ -1,6 +1,6 @@
<template>
<div class="space-y-1">
<label class="block text-xs text-gray-600" v-if="props.label">
<label class="block text-xs text-ink-gray-5" v-if="props.label">
{{ props.label }}
</label>
<div class="flex text-center">

View File

@@ -1,7 +1,7 @@
<template>
<div
v-if="course.title"
class="flex flex-col h-full rounded-md shadow-md text-base overflow-auto"
class="flex flex-col h-full rounded-md border-2 overflow-auto"
style="min-height: 350px"
>
<div
@@ -15,14 +15,12 @@
<Badge v-if="course.featured" variant="subtle" theme="green" size="md">
{{ __('Featured') }}
</Badge>
<Badge
variant="subtle"
theme="gray"
size="md"
<div
v-for="tag in course.tags"
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md"
>
{{ tag }}
</Badge>
</div>
</div>
<div v-if="!course.image" class="image-placeholder">
{{ course.title[0] }}
@@ -32,8 +30,8 @@
<div class="flex items-center justify-between mb-2">
<div v-if="course.lessons">
<Tooltip :text="__('Lessons')">
<span class="flex items-center">
<BookOpen class="h-4 w-4 stroke-1.5 text-gray-700 mr-1" />
<span class="flex items-center text-ink-gray-7">
<BookOpen class="h-4 w-4 stroke-1.5 mr-1" />
{{ course.lessons }}
</span>
</Tooltip>
@@ -41,8 +39,8 @@
<div v-if="course.enrollments">
<Tooltip :text="__('Enrolled Students')">
<span class="flex items-center">
<Users class="h-4 w-4 stroke-1.5 text-gray-700 mr-1" />
<span class="flex items-center text-ink-gray-7">
<Users class="h-4 w-4 stroke-1. mr-1" />
{{ course.enrollments }}
</span>
</Tooltip>
@@ -50,8 +48,8 @@
<div v-if="course.rating">
<Tooltip :text="__('Average Rating')">
<span class="flex items-center">
<Star class="h-4 w-4 stroke-1.5 text-gray-700 mr-1" />
<span class="flex items-center text-ink-gray-7">
<Star class="h-4 w-4 stroke-1.5 mr-1" />
{{ course.rating }}
</span>
</Tooltip>
@@ -68,11 +66,11 @@
</div>
</div>
<div class="text-xl font-semibold leading-6">
<div class="text-xl font-semibold leading-6 text-ink-gray-9">
{{ course.title }}
</div>
<div class="short-introduction text-gray-700 text-sm">
<div class="short-introduction text-ink-gray-7 text-sm">
{{ course.short_introduction }}
</div>
@@ -81,7 +79,10 @@
:progress="course.membership.progress"
/>
<div v-if="user && course.membership" class="text-sm mb-4">
<div
v-if="user && course.membership"
class="text-sm text-ink-gray-7 mt-2 mb-4"
>
{{ Math.ceil(course.membership.progress) }}% completed
</div>

View File

@@ -1,5 +1,5 @@
<template>
<div class="shadow rounded-md min-w-80">
<div class="border-2 rounded-md min-w-80">
<iframe
v-if="course.data.video_link"
:src="video_link"
@@ -48,7 +48,7 @@
</router-link>
<div
v-else-if="course.data.disable_self_learning"
class="bg-blue-100 text-blue-900 text-sm rounded-md py-1 px-3"
class="bg-surface-blue-2 text-blue-900 text-sm rounded-md py-1 px-3"
>
{{ __('Contact the Administrator to enroll for this course.') }}
</div>
@@ -88,23 +88,26 @@
</Button>
</router-link>
<div class="space-y-4">
<div class="mt-8 font-medium">
<div class="mt-8 font-medium text-ink-gray-9">
{{ __('This course has:') }}
</div>
<div class="flex items-center">
<BookOpen class="h-4 w-4 stroke-1.5 text-gray-600" />
<div class="flex items-center text-ink-gray-9">
<BookOpen class="h-4 w-4 stroke-1.5" />
<span class="ml-2">
{{ course.data.lessons }} {{ __('Lessons') }}
</span>
</div>
<div class="flex items-center">
<Users class="h-4 w-4 stroke-1.5 text-gray-600" />
<div class="flex items-center text-ink-gray-9">
<Users class="h-4 w-4 stroke-1.5" />
<span class="ml-2">
{{ formatAmount(course.data.enrollments) }}
{{ __('Enrolled Students') }}
</span>
</div>
<div v-if="parseInt(course.data.rating) > 0" class="flex items-center">
<div
v-if="parseInt(course.data.rating) > 0"
class="flex items-center text-ink-gray-9"
>
<Star class="h-4 w-4 stroke-1.5 fill-orange-500 text-gray-50" />
<span class="ml-2">
{{ course.data.rating }} {{ __('Rating') }}

View File

@@ -1,44 +1,46 @@
<template>
<span v-if="instructors?.length == 1">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].full_name }}
</router-link>
</span>
<span v-if="instructors?.length == 2">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].first_name }}
</router-link>
and
<router-link
:to="{
name: 'Profile',
params: { username: instructors[1].username },
}"
>
{{ instructors[1].first_name }}
</router-link>
</span>
<span v-if="instructors?.length > 2">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].first_name }}
</router-link>
and {{ instructors?.length - 1 }} others
</span>
<div class="text-ink-gray-7">
<span v-if="instructors?.length == 1">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].full_name }}
</router-link>
</span>
<span v-if="instructors?.length == 2">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].first_name }}
</router-link>
and
<router-link
:to="{
name: 'Profile',
params: { username: instructors[1].username },
}"
>
{{ instructors[1].first_name }}
</router-link>
</span>
<span v-if="instructors?.length > 2">
<router-link
:to="{
name: 'Profile',
params: { username: instructors[0].username },
}"
>
{{ instructors[0].first_name }}
</router-link>
and {{ instructors?.length - 1 }} others
</span>
</div>
</template>
<script setup>
const props = defineProps({

View File

@@ -4,7 +4,7 @@
v-if="title && (outline.data?.length || allowEdit)"
class="grid grid-cols-[70%,30%] mb-4 px-2"
>
<div class="font-semibold text-lg leading-5">
<div class="font-semibold text-lg leading-5 text-ink-gray-9">
{{ __(title) }}
</div>
<Button size="sm" v-if="allowEdit" @click="openChapterModal()">
@@ -16,7 +16,7 @@
</div>
<div
:class="{
'shadow rounded-md py-2 px-2': showOutline && outline.data?.length,
'border-2 rounded-md py-2 px-2': showOutline && outline.data?.length,
}"
>
<Disclosure
@@ -33,10 +33,10 @@
hidden: chapter.is_scorm_package,
open: index == 1,
}"
class="h-4 w-4 text-gray-900 stroke-1"
class="h-4 w-4 text-ink-gray-9 stroke-1"
/>
<div
class="text-base text-left font-medium leading-5 ml-2"
class="text-base text-left text-ink-gray-9 font-medium leading-5 ml-2"
@click="redirectToChapter(chapter)"
>
{{ chapter.title }}
@@ -46,14 +46,14 @@
<FilePenLine
v-if="allowEdit"
@click.prevent="openChapterModal(chapter)"
class="h-4 w-4 text-gray-900 invisible group-hover:visible"
class="h-4 w-4 text-ink-gray-9 invisible group-hover:visible"
/>
</Tooltip>
<Tooltip :text="__('Delete Chapter')" placement="bottom">
<Trash2
v-if="allowEdit"
@click.prevent="trashChapter(chapter.name)"
class="h-4 w-4 text-red-500 invisible group-hover:visible"
class="h-4 w-4 text-ink-red-3 invisible group-hover:visible"
/>
</Tooltip>
</div>
@@ -69,7 +69,12 @@
:data-chapter="chapter.name"
>
<template #item="{ element: lesson }">
<div class="outline-lesson pl-8 py-2 pr-4">
<div
class="outline-lesson pl-8 py-2 pr-4 text-ink-gray-9"
:class="
isActiveLesson(lesson.number) ? 'bg-surface-selected' : ''
"
>
<router-link
:to="{
name: allowEdit ? 'LessonForm' : 'Lesson',
@@ -83,21 +88,21 @@
<div class="flex items-center text-sm leading-5 group">
<MonitorPlay
v-if="lesson.icon === 'icon-youtube'"
class="h-4 w-4 text-gray-900 stroke-1 mr-2"
class="h-4 w-4 stroke-1 mr-2"
/>
<HelpCircle
v-else-if="lesson.icon === 'icon-quiz'"
class="h-4 w-4 text-gray-900 stroke-1 mr-2"
class="h-4 w-4 stroke-1 mr-2"
/>
<FileText
v-else-if="lesson.icon === 'icon-list'"
class="h-4 w-4 text-gray-900 stroke-1 mr-2"
class="h-4 w-4 text-ink-gray-9 stroke-1 mr-2"
/>
{{ lesson.title }}
<Trash2
v-if="allowEdit"
@click.prevent="trashLesson(lesson.name, chapter.name)"
class="h-4 w-4 text-red-500 ml-auto invisible group-hover:visible"
class="h-4 w-4 text-ink-red-3 ml-auto invisible group-hover:visible"
/>
<Check
v-if="lesson.is_complete"
@@ -323,9 +328,11 @@ const redirectToChapter = (chapter) => {
},
})
}
</script>
<style>
.outline-lesson:has(.router-link-active) {
background-color: theme('colors.gray.100');
const isActiveLesson = (lessonNumber) => {
return (
route.params.chapterNumber == lessonNumber.split('.')[0] &&
route.params.lessonNumber == lessonNumber.split('.')[1]
)
}
</style>
</script>

View File

@@ -7,7 +7,7 @@
>
{{ __('Write a Review') }}
</Button>
<div class="flex items-center font-semibold text-2xl">
<div class="flex items-center font-semibold text-2xl text-ink-gray-9">
{{ __('Student Reviews') }}
</div>
<div class="grid gap-8 mt-10">
@@ -28,17 +28,17 @@
params: { username: review.owner_details.username },
}"
>
<span class="text-lg font-medium mr-4">
<span class="text-lg font-medium mr-4 text-ink-gray-7">
{{ review.owner_details.full_name }}
</span>
</router-link>
<span>
<span class="text-ink-gray-7">
{{ review.creation }}
</span>
<div class="flex mt-2">
<Star
v-for="index in 5"
class="h-5 w-5 text-gray-100 bg-gray-200 rounded-sm mr-2"
class="h-5 w-5 text-ink-gray-2 rounded-sm mr-2"
:class="
index <= Math.ceil(review.rating)
? 'fill-orange-500'
@@ -48,7 +48,7 @@
</div>
</div>
</div>
<div v-if="review.review" class="mt-4 leading-5">
<div v-if="review.review" class="mt-4 leading-5 text-ink-gray-7">
{{ review.review }}
</div>
</div>

View File

@@ -6,7 +6,7 @@
<div v-if="course.chapters.length">
{{ course.chapters }}
</div>
<div v-else class="border bg-white rounded-md p-5 text-center mt-4">
<div v-else class="border bg-surface-white rounded-md p-5 text-center mt-4">
<div>
{{
__(

View File

@@ -1,7 +1,7 @@
<template>
<div class="relative flex h-full flex-col">
<div class="h-full flex-1">
<div class="flex h-screen text-base">
<div class="flex h-screen text-base bg-surface-white">
<div
class="relative block min-h-0 flex-shrink-0 overflow-hidden hover:overflow-auto"
>

View File

@@ -3,10 +3,10 @@
<div v-if="!singleThread" class="flex items-center mb-5">
<Button variant="outline" @click="showTopics = true">
<template #icon>
<ChevronLeft class="w-5 h-5 stroke-1.5 text-gray-700" />
<ChevronLeft class="w-5 h-5 stroke-1.5 text-ink-gray-7" />
</template>
</Button>
<span class="text-lg font-semibold ml-2">
<span class="text-lg font-semibold ml-2 text-ink-gray-9">
{{ topic.title }}
</span>
</div>
@@ -17,7 +17,7 @@
:class="{ 'border-b': index + 1 != replies.data.length }"
>
<div class="flex items-center justify-between mb-2">
<div class="flex items-center">
<div class="flex items-center text-ink-gray-5">
<UserAvatar :user="reply.user" class="mr-2" />
<span>
{{ reply.user.full_name }}
@@ -63,7 +63,7 @@
:fixedMenu="reply.editable || false"
:editorClass="
reply.editable
? 'ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-gray-300 prose-th:border-gray-300 prose-td:relative prose-th:relative prose-th:bg-gray-100 prose-sm max-w-none'
? 'ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-outline-gray-2 prose-th:border-outline-gray-2 prose-td:relative prose-th:relative prose-th:bg-surface-gray-2 prose-sm max-w-none'
: 'prose-sm'
"
/>
@@ -78,7 +78,7 @@
@change="(val) => (newReply = val)"
placeholder="Type your reply here..."
:fixedMenu="true"
editorClass="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-gray-300 prose-th:border-gray-300 prose-td:relative prose-th:relative prose-th:bg-gray-100 prose-sm max-w-none border border-gray-300 rounded-b-md min-h-[7rem] py-1 px-2"
editorClass="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-outline-gray-2 prose-th:border-outline-gray-2 prose-td:relative prose-th:relative prose-th:bg-surface-gray-2 prose-sm max-w-none border border-outline-gray-2 rounded-b-md min-h-[7rem] py-1 px-2"
/>
<div class="flex justify-between mt-2">
<span> </span>
@@ -193,7 +193,7 @@ const postReply = () => {
title: 'Error',
text: err.messages?.[0] || err,
icon: 'x',
iconClasses: 'bg-red-600 text-white rounded-md p-px',
iconClasses: 'bg-surface-red-5 text-ink-white rounded-md p-px',
position: 'top-center',
timeout: 10,
})

View File

@@ -3,7 +3,7 @@
<Button v-if="!singleThread" class="float-right" @click="openTopicModal()">
{{ __('New {0}').format(singularize(title)) }}
</Button>
<div class="text-xl font-semibold">
<div class="text-xl font-semibold text-ink-gray-9">
{{ __(title) }}
</div>
</div>
@@ -16,10 +16,10 @@
>
<UserAvatar :user="topic.user" size="2xl" class="mr-4" />
<div>
<div class="text-lg font-semibold mb-1">
<div class="text-lg font-semibold mb-1 text-ink-gray-7">
{{ topic.title }}
</div>
<div class="flex items-center">
<div class="flex items-center text-ink-gray-5">
<span>
{{ topic.user.full_name }}
</span>
@@ -44,12 +44,12 @@
v-else
class="flex flex-col items-center justify-center border-2 border-dashed mt-5 py-8 rounded-md"
>
<MessageSquareText class="w-7 h-7 text-gray-500 stroke-1.5 mr-2" />
<MessageSquareText class="w-7 h-7 text-ink-gray-4 stroke-1.5 mr-2" />
<div class="">
<div v-if="emptyStateTitle" class="font-medium mb-2">
{{ __(emptyStateTitle) }}
</div>
<div class="text-gray-600">
<div class="text-ink-gray-5">
{{ __(emptyStateText) }}
</div>
</div>

View File

@@ -3,30 +3,30 @@
<Avatar :image="job.company_logo" :label="job.job_title" size="2xl" />
<div class="flex flex-col space-y-2 flex-1">
<div class="flex items-center justify-between">
<span class="font-semibold">
<span class="font-semibold text-ink-gray-9">
{{ job.job_title }}
</span>
</div>
<div class="flex items-center space-x-2">
<Building2 class="w-4 h-4 stroke-1.5 text-gray-600" />
<div class="flex items-center space-x-2 text-ink-gray-5">
<Building2 class="w-4 h-4 stroke-1.5" />
<span>
{{ job.company_name }}
</span>
</div>
<div class="flex items-center space-x-2">
<MapPin class="w-4 h-4 stroke-1.5 text-gray-600" />
<div class="flex items-center space-x-2 text-ink-gray-5">
<MapPin class="w-4 h-4 stroke-1.5" />
<span>
{{ job.location }}
</span>
</div>
<div class="flex items-center space-x-2">
<Shapes class="w-4 h-4 stroke-1.5 text-gray-600" />
<div class="flex items-center space-x-2 text-ink-gray-5">
<Shapes class="w-4 h-4 stroke-1.5" />
<span>
{{ job.type }}
</span>
</div>
<div class="flex items-center space-x-2">
<Calendar class="w-4 h-4 stroke-1.5 text-gray-600" />
<div class="flex items-center space-x-2 text-ink-gray-5">
<Calendar class="w-4 h-4 stroke-1.5" />
<span> {{ __('posted') }} {{ dayjs(job.creation).fromNow() }} </span>
</div>
</div>

View File

@@ -1,12 +1,12 @@
<template>
<div class="space-y-5">
<div class="space-y-5 text-ink-gray-9">
<div class="space-y-2">
<div class="flex items-center text-sm font-medium space-x-2">
<span>
{{ __('What does include in preview mean?') }}
</span>
</div>
<div class="text-xs text-gray-600 mb-1 leading-5">
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
{{
__(
'If Include in Preview is enabled for a lesson then the lesson will also be accessible to non logged in users.'
@@ -23,9 +23,9 @@
<span>
{{ __('How to add a Quiz?') }}
</span>
<Info class="w-3 h-3 text-gray-700" />
<Info class="w-3 h-3 text-ink-gray-7" />
</div>
<div class="text-xs text-gray-600 mb-1 leading-5">
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
{{
__(
'Click on the add icon in the editor and select Quiz from the menu. It opens up a dialog, where you can either select a quiz from the list or create a new quiz. When you select the Create New option it redirects you to the quiz creation page.'
@@ -42,9 +42,9 @@
<span class="leading-5">
{{ __(contentMap['upload']) }}
</span>
<Info class="w-3 h-3 text-gray-700" />
<Info class="w-3 h-3 text-ink-gray-7" />
</div>
<div class="text-xs text-gray-600 mb-1 leading-5">
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
{{
__(
'To upload Image, Video, Audio or PDF from your system, click on the add icon and select upload from the menu. Then choose the file you want to add to the lesson and it gets added to your lesson.'
@@ -61,9 +61,9 @@
<span>
{{ __(contentMap['youtube']) }}
</span>
<Info class="w-3 h-3 text-gray-700" />
<Info class="w-3 h-3 text-ink-gray-7" />
</div>
<div class="text-xs text-gray-600 mb-1 leading-5">
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
{{
__(
'Copy the URL of the video from YouTube and paste it in the editor.'

View File

@@ -1,6 +1,6 @@
<template>
<div class="flex items-center justify-between mb-5">
<div class="text-lg font-semibold">
<div class="text-lg font-semibold text-ink-gray-9">
{{ __('Live Class') }}
</div>
<Button v-if="user.data.is_moderator" @click="openLiveClassModal">
@@ -15,9 +15,9 @@
<div v-if="liveClasses.data?.length" class="grid grid-cols-2 gap-5">
<div
v-for="cls in liveClasses.data"
class="flex flex-col border rounded-md h-full text-gray-700 p-3"
class="flex flex-col border rounded-md h-full text-ink-gray-7 p-3"
>
<div class="font-semibold text-gray-900 text-lg mb-1">
<div class="font-semibold text-ink-gray-9 text-lg mb-1">
{{ cls.title }}
</div>
<div class="short-introduction">
@@ -38,13 +38,13 @@
</div>
<div
v-if="cls.date >= dayjs().format('YYYY-MM-DD')"
class="flex items-center space-x-2 text-gray-900 mt-auto"
class="flex items-center space-x-2 text-ink-gray-9 mt-auto"
>
<a
v-if="user.data?.is_moderator || user.data?.is_evaluator"
:href="cls.start_url"
target="_blank"
class="w-1/2 cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-gray-800 bg-gray-100 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring focus-visible:ring-gray-400 h-7 text-base px-2 rounded"
class="w-1/2 cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-ink-gray-8 bg-surface-gray-2 hover:bg-surface-gray-3 active:bg-surface-gray-4 focus-visible:ring focus-visible:ring-outline-gray-3 h-7 text-base px-2 rounded"
>
<Monitor class="h-4 w-4 stroke-1.5" />
{{ __('Start') }}
@@ -52,7 +52,7 @@
<a
:href="cls.join_url"
target="_blank"
class="w-full cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-gray-800 bg-gray-100 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring focus-visible:ring-gray-400 h-7 text-base px-2 rounded"
class="w-full cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-ink-gray-8 bg-surface-gray-2 hover:bg-surface-gray-3 active:bg-surface-gray-4 focus-visible:ring focus-visible:ring-outline-gray-3 h-7 text-base px-2 rounded"
>
<Video class="h-4 w-4 stroke-1.5" />
{{ __('Join') }}
@@ -67,7 +67,7 @@
</div>
</div>
</div>
<div v-else class="text-sm italic text-gray-600">
<div v-else class="text-sm italic text-ink-gray-5">
{{ __('No live classes scheduled') }}
</div>
<LiveClassModal

View File

@@ -2,10 +2,10 @@
<div class="flex min-h-0 flex-col text-base">
<div class="flex items-center justify-between">
<div>
<div class="text-xl font-semibold mb-1">
<div class="text-xl font-semibold mb-1 text-ink-gray-9">
{{ __(label) }}
</div>
<!-- <div class="text-xs text-gray-600">
<!-- <div class="text-xs text-ink-gray-5">
{{ __(description) }}
</div> -->
</div>
@@ -63,7 +63,7 @@
/>
<div class="space-y-1">
<div class="flex">
<div class="text-gray-900">
<div class="text-ink-gray-9">
{{ member.full_name }}
</div>
<div
@@ -81,12 +81,14 @@
</Badge>
</div>
</div>
<div class="text-sm text-gray-700">
<div class="text-sm text-ink-gray-7">
{{ member.name }}
</div>
</div>
</div>
<div class="flex items-center justify-center text-gray-700 text-sm">
<div
class="flex items-center justify-center text-ink-gray-7 text-sm"
>
<div v-if="member.last_active">
{{ dayjs(member.last_active).format('DD MMM, YYYY HH:mm a') }}
</div>

View File

@@ -5,7 +5,7 @@
</div>
<div
v-if="sidebarSettings.data"
class="fixed flex items-center justify-around border-t border-gray-300 bottom-0 z-10 w-full bg-white standalone:pb-4"
class="fixed flex items-center justify-around border-t border-outline-gray-2 bottom-0 z-10 w-full bg-surface-white standalone:pb-4"
:style="{
gridTemplateColumns: `repeat(${
sidebarLinks.length + 1
@@ -22,7 +22,7 @@
<component
:is="icons[tab.icon]"
class="h-6 w-6 stroke-1.5"
:class="[isActive(tab) ? 'text-gray-900' : 'text-gray-600']"
:class="[isActive(tab) ? 'text-ink-gray-9' : 'text-ink-gray-5']"
/>
</button>
<Popover
@@ -33,7 +33,7 @@
<template #target>
<component
:is="icons['List']"
class="h-6 w-6 stroke-1.5 text-gray-600"
class="h-6 w-6 stroke-1.5 text-ink-gray-5"
/>
</template>
<template #body-main>
@@ -46,7 +46,7 @@
>
<component
:is="icons[link.icon]"
class="h-4 w-4 stroke-1.5 text-gray-600"
class="h-4 w-4 stroke-1.5 text-ink-gray-5"
/>
<div>
{{ link.label }}

View File

@@ -16,26 +16,26 @@
<template #body-content>
<div class="flex flex-col gap-4">
<div class="">
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Subject') }}
<span class="text-red-500">*</span>
<span class="text-ink-red-3">*</span>
</div>
<Input type="text" v-model="announcement.subject" />
</div>
<div class="">
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Reply To') }}
</div>
<Input type="text" v-model="announcement.replyTo" />
</div>
<div class="mb-4">
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Announcement') }}
</div>
<TextEditor
:bubbleMenu="true"
:fixedMenu="true"
@change="(val) => (announcement.announcement = val)"
editorClass="prose-sm py-2 px-2 min-h-[200px] border-gray-300 hover:border-gray-400 rounded-md bg-gray-200"
editorClass="prose-sm py-2 px-2 min-h-[200px] border-outline-gray-2 hover:border-outline-gray-3 rounded-b-md bg-surface-gray-3"
/>
</div>
</div>
@@ -102,7 +102,7 @@ const makeAnnouncement = (close) => {
)
},
onError(err) {
showToast(__('Error'), __(err.messages?.[0] || err), 'check')
showToast(__('Error'), __(err.messages?.[0] || err), 'alert-circle')
},
}
)

View File

@@ -18,7 +18,7 @@
{{ student.progress }}% {{ __('Complete') }}
</Badge>
</div>
<div class="text-sm text-gray-700">
<div class="text-sm text-ink-gray-7">
{{ student.email }}
</div>
</div>
@@ -32,25 +32,44 @@
{{ __('Assessment') }}
</span>
<span>
{{ __('Progress') }}
{{ __('Percentage/Status') }}
</span>
</div>
<div
<router-link
v-for="assessment in Object.keys(student.assessments)"
class="flex items-center text-gray-700 font-medium"
class="flex items-center text-ink-gray-7 font-medium"
:to="{
name:
student.assessments[assessment].type == 'LMS Assignment'
? 'AssignmentSubmission'
: '',
params:
student.assessments[assessment].type == 'LMS Assignment'
? {
assignmentID:
student.assessments[assessment].assessment,
submissionName:
student.assessments[assessment].submission,
}
: {},
}"
>
<span class="flex-1">
{{ assessment }}
</span>
<span v-if="isAssignment(student.assessments[assessment])">
<Badge :theme="getStatusTheme(student.assessments[assessment])">
{{ student.assessments[assessment] }}
<span v-if="isAssignment(student.assessments[assessment].status)">
<Badge
:theme="
getStatusTheme(student.assessments[assessment].status)
"
>
{{ student.assessments[assessment].status }}
</Badge>
</span>
<span v-else>
{{ student.assessments[assessment] }}
{{ student.assessments[assessment].status }}
</span>
</div>
</router-link>
</div>
<!-- Courses -->
@@ -65,7 +84,7 @@
</div>
<div
v-for="course in Object.keys(student.courses)"
class="flex items-center text-gray-700 font-medium"
class="flex items-center text-ink-gray-7 font-medium"
>
<span class="flex-1">
{{ course }}
@@ -78,7 +97,7 @@
</div>
<!-- Heatmap -->
<StudentHeatmap :member="student.email" :base_days="120" />
<StudentHeatmap :member="student.email" :days="120" />
</div>
</template>
</Dialog>

View File

@@ -47,19 +47,19 @@
<div v-else class="">
<div class="flex items-center">
<div class="border rounded-md p-2 mr-2">
<FileText class="h-5 w-5 stroke-1.5 text-gray-700" />
<FileText class="h-5 w-5 stroke-1.5 text-ink-gray-7" />
</div>
<div class="flex flex-col">
<span>
{{ chapter.scorm_package.file_name }}
</span>
<span class="text-sm text-gray-500 mt-1">
<span class="text-sm text-ink-gray-4 mt-1">
{{ getFileSize(chapter.scorm_package.file_size) }}
</span>
</div>
<X
@click="() => (chapter.scorm_package = null)"
class="bg-gray-200 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
class="bg-surface-gray-3 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
/>
</div>
</div>
@@ -145,9 +145,9 @@ const addChapter = async (close) => {
{
onSuccess(data) {
cleanChapter()
if (!settingsStore.onboardingDetails.data?.is_onboarded) {
/* if (!settingsStore.onboardingDetails.data?.is_onboarded) {
settingsStore.onboardingDetails.reload()
}
} */
outline.value.reload()
showToast(
__('Success'),

View File

@@ -18,7 +18,7 @@
<FormControl v-model="topic.title" :label="__('Title')" type="text" />
</div>
<div>
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Details') }}
</div>
<TextEditor
@@ -26,7 +26,7 @@
@change="(val) => (topic.reply = val)"
:editable="true"
:fixedMenu="true"
editorClass="prose-sm max-w-none border-b border-x bg-gray-100 rounded-b-md py-1 px-2 min-h-[7rem]"
editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem]"
/>
</div>
</div>

View File

@@ -5,7 +5,7 @@
</template>
<template #body>
<div
class="absolute left-1/2 mt-3 w-96 max-w-lg -translate-x-1/2 transform rounded-lg bg-white px-4 sm:px-0 lg:max-w-3xl"
class="absolute left-1/2 mt-3 w-96 max-w-lg -translate-x-1/2 transform rounded-lg bg-surface-white px-4 sm:px-0 lg:max-w-3xl"
>
<div
class="overflow-hidden rounded-lg p-3 shadow-2xl ring-1 ring-black ring-opacity-5"
@@ -35,7 +35,7 @@
</FileUploader>
</div>
<div
class="relative mt-2 grid w-[25.5rem] gap-2 bg-white lg:grid-cols-2"
class="relative mt-2 grid w-[25.5rem] gap-2 bg-surface-white lg:grid-cols-2"
>
<button
v-for="image in images.data"
@@ -53,7 +53,7 @@
</div>
<div
v-if="images.data"
class="mt-2 text-center text-sm text-gray-500"
class="mt-2 text-center text-sm text-ink-gray-4"
>
{{ __('Image search powered by') }}
<a class="underline" target="_blank" href="https://unsplash.com">

View File

@@ -33,24 +33,24 @@
</template>
</FileUploader>
<div v-else class="mb-4">
<div class="text-xs text-gray-600 mb-1">
<div class="text-xs text-ink-gray-5 mb-1">
{{ __('Profile Image') }}
</div>
<div class="flex items-center">
<div class="border rounded-md p-2 mr-2">
<FileText class="h-5 w-5 stroke-1.5 text-gray-700" />
<FileText class="h-5 w-5 stroke-1.5 text-ink-gray-7" />
</div>
<div class="text-base flex flex-col">
<span>
{{ profile.image.file_name }}
</span>
<span class="text-sm text-gray-500 mt-1">
<span class="text-sm text-ink-gray-4 mt-1">
{{ getFileSize(profile.image.file_size) }}
</span>
</div>
<X
@click="removeImage()"
class="bg-gray-200 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
class="bg-surface-gray-3 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
/>
</div>
</div>
@@ -71,14 +71,14 @@
/>
<div class="mb-4">
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Bio') }}
</div>
<TextEditor
:fixedMenu="true"
@change="(val) => (profile.bio = val)"
:content="profile.bio"
editorClass="prose-sm py-2 px-2 min-h-[200px] border-gray-300 hover:border-gray-400 rounded-md bg-gray-200"
editorClass="prose-sm py-2 px-2 min-h-[200px] border-outline-gray-2 hover:border-outline-gray-3 rounded-md bg-surface-gray-3"
/>
</div>
</div>

View File

@@ -16,25 +16,25 @@
<template #body-content>
<div class="flex flex-col gap-4">
<div>
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Course') }}
</div>
<Select v-model="evaluation.course" :options="getCourses()" />
</div>
<div>
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Date') }}
</div>
<FormControl type="date" v-model="evaluation.date" />
</div>
<div v-if="slots.data?.length">
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Select a slot') }}
</div>
<div class="grid grid-cols-2 gap-2">
<div v-for="slot in slots.data">
<div
class="text-base text-center border rounded-md bg-gray-200 p-2 cursor-pointer"
class="text-base text-center border rounded-md bg-surface-gray-3 p-2 cursor-pointer"
@click="saveSlot(slot)"
:class="{
'border-gray-900': evaluation.start_time == slot.start_time,
@@ -48,7 +48,7 @@
</div>
<div
v-else-if="evaluation.course && evaluation.date"
class="text-sm italic text-red-600"
class="text-sm italic text-ink-red-4"
>
{{ __('No slots available for this date.') }}
</div>
@@ -143,7 +143,7 @@ function submitEvaluation(close) {
title: unavailabilityMessage ? __('Evaluator is Unavailable') : '',
text: message,
icon: unavailabilityMessage ? 'alert-circle' : 'x',
iconClasses: 'bg-yellow-600 text-white rounded-md p-px',
iconClasses: 'bg-yellow-600 text-ink-white rounded-md p-px',
position: 'top-center',
timeout: 10,
})

View File

@@ -12,7 +12,7 @@
{{ event.title }}
</div>
<div class="flex flex-col space-y-4 text-sm text-gray-800">
<div class="flex flex-col space-y-4 text-sm text-ink-gray-8">
<Tooltip :text="__('Email ID')">
<div class="flex items-center space-x-2 w-fit">
<User class="h-4 w-4 stroke-1.5" />

View File

@@ -48,13 +48,13 @@
</div>
<div v-else class="flex items-center">
<div class="border rounded-md p-2 mr-2">
<FileText class="h-5 w-5 stroke-1.5 text-gray-700" />
<FileText class="h-5 w-5 stroke-1.5 text-ink-gray-7" />
</div>
<div class="flex flex-col">
<span>
{{ resume.file_name }}
</span>
<span class="text-sm text-gray-500 mt-1">
<span class="text-sm text-ink-gray-4 mt-1">
{{ getFileSize(resume.file_size) }}
</span>
</div>
@@ -116,7 +116,7 @@ const submitResume = (close) => {
title: 'Success',
text: 'Your application has been submitted',
icon: 'check',
iconClasses: 'bg-green-600 text-white rounded-md p-px',
iconClasses: 'bg-surface-green-3 text-ink-white rounded-md p-px',
})
application.value.reload()
close()
@@ -126,7 +126,7 @@ const submitResume = (close) => {
title: 'Error',
text: err.messages?.[0] || err,
icon: 'x',
iconClasses: 'bg-red-600 text-white rounded-md p-px',
iconClasses: 'bg-surface-red-5 text-ink-white rounded-md p-px',
position: 'top-center',
timeout: 10,
})

View File

@@ -200,7 +200,7 @@ const submitLiveClass = (close) => {
title: 'Error',
text: err.messages?.[0] || err,
icon: 'x',
iconClasses: 'bg-red-600 text-white rounded-md p-px',
iconClasses: 'bg-surface-red-5 text-ink-white rounded-md p-px',
position: 'top-center',
timeout: 10,
})

View File

@@ -4,7 +4,7 @@
<div class="space-y-4">
<div
v-if="!editMode"
class="flex items-center text-xs text-gray-700 space-x-5"
class="flex items-center text-xs text-ink-gray-7 space-x-5"
>
<div class="flex items-center space-x-2">
<input
@@ -34,7 +34,7 @@
</div>
<div v-if="questionType == 'new' || editMode" class="space-y-2">
<div>
<label class="block text-xs text-gray-600 mb-1">
<label class="block text-xs text-ink-gray-5 mb-1">
{{ __('Question') }}
</label>
<TextEditor
@@ -42,7 +42,7 @@
@change="(val) => (question.question = val)"
:editable="true"
:fixedMenu="true"
editorClass="prose-sm max-w-none border-b border-x bg-gray-100 rounded-b-md py-1 px-2 min-h-[7rem]"
editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem]"
/>
</div>
<FormControl

View File

@@ -16,13 +16,13 @@
<template #body-content>
<div class="flex flex-col gap-4">
<div>
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Rating') }}
</div>
<Rating v-model="review.rating" />
</div>
<div>
<div class="mb-1.5 text-sm text-gray-600">
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Review') }}
</div>
<Textarea type="text" size="md" rows="5" v-model="review.review" />
@@ -81,7 +81,7 @@ function submitReview(close) {
createToast({
text: err.messages?.[0] || err,
icon: 'x',
iconClasses: 'text-red-600 bg-red-300',
iconClasses: 'text-ink-red-4 bg-surface-red-4',
})
},
})

View File

@@ -2,14 +2,14 @@
<Dialog v-model="show" :options="{ size: '4xl' }">
<template #body>
<div class="flex h-[calc(100vh_-_8rem)]">
<div class="flex w-52 shrink-0 flex-col bg-gray-50 p-2">
<h1 class="mb-3 px-2 pt-2 text-lg font-semibold">
<div class="flex w-52 shrink-0 flex-col bg-surface-gray-2 p-2">
<h1 class="mb-3 px-2 pt-2 text-lg font-semibold text-ink-gray-9">
{{ __('Settings') }}
</h1>
<div v-for="tab in tabs" :key="tab.label">
<div
v-if="!tab.hideLabel"
class="mb-2 mt-3 flex cursor-pointer gap-1.5 px-1 text-base font-medium text-gray-600 transition-all duration-300 ease-in-out"
class="mb-2 mt-3 flex cursor-pointer gap-1.5 px-1 text-base font-medium text-ink-gray-5 transition-all duration-300 ease-in-out"
>
<span>{{ __(tab.label) }}</span>
</div>
@@ -21,8 +21,8 @@
class="w-full"
:class="
activeTab?.label == item.label
? 'bg-white shadow-sm'
: 'hover:bg-gray-100'
? 'bg-surface-selected shadow-sm'
: 'hover:bg-surface-gray-2'
"
@click="activeTab = item"
/>
@@ -32,7 +32,7 @@
<div
v-if="activeTab && data.doc"
:key="activeTab.label"
class="flex flex-1 flex-col px-10 py-8"
class="flex flex-1 flex-col px-10 py-8 bg-surface-modal"
>
<Members
v-if="activeTab.label === 'Members'"
@@ -118,6 +118,13 @@ const tabsStructure = computed(() => {
'This will enforce students to go through programs assigned to them in the correct order.',
type: 'checkbox',
},
{
label: 'Allow Guest Access',
name: 'allow_guest_access',
description:
'If enabled, users can access the course and batch lists without logging in.',
type: 'checkbox',
},
{
label: 'Send calendar invite for evaluations',
name: 'send_calendar_invite_for_evaluations',
@@ -130,7 +137,7 @@ const tabsStructure = computed(() => {
name: 'unsplash_access_key',
description:
'Optional. If this is set, students can pick a cover image from the unsplash library for their profile page. https://unsplash.com/documentation#getting-started.',
type: 'text',
type: 'password',
},
],
},

View File

@@ -46,11 +46,9 @@ const studentResource = createResource({
makeParams(values) {
return {
doc: {
doctype: 'Batch Student',
parent: props.batch,
parenttype: 'LMS Batch',
parentfield: 'students',
student: student.value,
doctype: 'LMS Batch Enrollment',
batch: props.batch,
member: student.value,
},
}
},

View File

@@ -2,7 +2,7 @@
<div class="border rounded-md w-1/3 mx-auto my-32">
<div class="border-b px-5 py-3 font-medium">
<span
class="inline-flex items-center before:bg-red-600 before:w-2 before:h-2 before:rounded-md before:mr-2"
class="inline-flex items-center before:bg-surface-red-5 before:w-2 before:h-2 before:rounded-md before:mr-2"
></span>
{{ __('Not Permitted') }}
</div>

View File

@@ -2,7 +2,7 @@
<div class="text-base border rounded-md w-1/3 mx-auto my-32">
<div class="border-b px-5 py-3 font-medium">
<span
class="inline-flex items-center before:bg-red-600 before:w-2 before:h-2 before:rounded-md before:mr-2"
class="inline-flex items-center before:bg-surface-red-5 before:w-2 before:h-2 before:rounded-md before:mr-2"
></span>
{{ __(title) }}
</div>

View File

@@ -6,7 +6,7 @@
@click="skipOnboarding.reload()"
/>
</Tooltip>
<div class="flex items-center justify-evenly bg-gray-100 p-10">
<div class="flex items-center justify-evenly bg-surface-gray-2 p-10">
<div
@click="redirectToCourseForm()"
class="flex items-center space-x-2"
@@ -16,11 +16,14 @@
>
<span
v-if="onboardingDetails.data.course_created?.length"
class="py-1 px-1 bg-white rounded-full"
class="py-1 px-1 bg-surface-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
<Check class="h-4 w-4 stroke-2 text-ink-green-3" />
</span>
<span v-else class="font-semibold bg-white px-2 py-1 rounded-full">
<span
v-else
class="font-semibold bg-surface-white px-2 py-1 rounded-full"
>
1
</span>
<span class="text-lg font-semibold">
@@ -34,16 +37,19 @@
'cursor-pointer':
onboardingDetails.data.course_created?.length &&
!onboardingDetails.data.chapter_created?.length,
'text-gray-400': !onboardingDetails.data.course_created?.length,
'text-ink-gray-3': !onboardingDetails.data.course_created?.length,
}"
>
<span
v-if="onboardingDetails.data.chapter_created?.length"
class="py-1 px-1 bg-white rounded-full"
class="py-1 px-1 bg-surface-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
<Check class="h-4 w-4 stroke-2 text-ink-green-3" />
</span>
<span v-else class="font-semibold bg-white px-2 py-1 rounded-full">
<span
v-else
class="font-semibold bg-surface-white px-2 py-1 rounded-full"
>
2
</span>
<span class="text-lg font-semibold">
@@ -57,18 +63,20 @@
'cursor-pointer':
onboardingDetails.data.course_created?.length &&
onboardingDetails.data.chapter_created?.length,
'text-gray-400':
'text-ink-gray-3':
!onboardingDetails.data.course_created?.length ||
!onboardingDetails.data.chapter_created?.length,
}"
>
<span
v-if="onboardingDetails.data.lesson_created?.length"
class="py-1 px-1 bg-white rounded-full"
class="py-1 px-1 bg-surface-white rounded-full"
>
<Check class="h-4 w-4 stroke-2 text-green-600" />
<Check class="h-4 w-4 stroke-2 text-ink-green-3" />
</span>
<span class="font-semibold bg-surface-white px-2 py-1 rounded-full">
3
</span>
<span class="font-semibold bg-white px-2 py-1 rounded-full"> 3 </span>
<span class="text-lg font-semibold">
{{ __('Add a lesson') }}
</span>

View File

@@ -1,7 +1,7 @@
<template>
<div class="flex flex-col h-full">
<div class="flex items-center justify-between">
<div class="text-xl font-semibold mb-1">
<div class="text-xl font-semibold mb-1 text-ink-gray-9">
{{ label }}
</div>
<!-- <Badge

View File

@@ -1,8 +1,8 @@
<template>
<Tooltip :text="`${props.progress}%`">
<div class="w-full bg-gray-200 rounded-full h-1">
<div class="w-full bg-surface-gray-3 rounded-full h-1">
<div
class="bg-gray-900 rounded-full"
class="bg-surface-gray-7 rounded-full"
:class="progressBarHeight"
:style="{ width: progressBarWidth }"
></div>

View File

@@ -1,7 +1,7 @@
<template>
<div v-if="quiz.data">
<div
class="bg-blue-100 space-y-1 py-2 px-2 mb-4 rounded-md text-sm text-blue-800"
class="bg-surface-blue-2 space-y-1 py-2 px-2 mb-4 rounded-md text-sm text-ink-blue-800"
>
<div class="leading-5">
{{
@@ -83,7 +83,7 @@
class="border rounded-md p-5"
>
<div class="flex justify-between">
<div class="text-sm text-gray-600">
<div class="text-sm text-ink-gray-5">
<span class="mr-2">
{{ __('Question {0}').format(activeQuestion) }}:
</span>
@@ -91,25 +91,25 @@
{{ getInstructions(questionDetails.data) }}
</span>
</div>
<div class="text-gray-900 text-sm font-semibold item-left">
<div class="text-ink-gray-9 text-sm font-semibold item-left">
{{ question.marks }}
{{ question.marks == 1 ? __('Mark') : __('Marks') }}
</div>
</div>
<div
class="text-gray-900 font-semibold mt-2 leading-5"
class="text-ink-gray-9 font-semibold mt-2 leading-5"
v-html="questionDetails.data.question"
></div>
<div v-if="questionDetails.data.type == 'Choices'" v-for="index in 4">
<label
v-if="questionDetails.data[`option_${index}`]"
class="flex items-center bg-gray-200 rounded-md p-3 mt-4 w-full cursor-pointer focus:border-blue-600"
class="flex items-center bg-surface-gray-3 rounded-md p-3 mt-4 w-full cursor-pointer focus:border-blue-600"
>
<input
v-if="!showAnswers.length && !questionDetails.data.multiple"
type="radio"
:name="encodeURIComponent(questionDetails.data.question)"
class="w-3.5 h-3.5 text-gray-900 focus:ring-gray-200"
class="w-3.5 h-3.5 text-ink-gray-9 focus:ring-outline-gray-modals"
@change="markAnswer(index)"
/>
@@ -117,7 +117,7 @@
v-else-if="!showAnswers.length && questionDetails.data.multiple"
type="checkbox"
:name="encodeURIComponent(questionDetails.data.question)"
class="w-3.5 h-3.5 text-gray-900 rounded-sm focus:ring-gray-200"
class="w-3.5 h-3.5 text-ink-gray-9 rounded-sm focus:ring-outline-gray-modals"
@change="markAnswer(index)"
/>
<div
@@ -127,15 +127,15 @@
<div v-if="index - 1 == idx">
<CheckCircle
v-if="answer == 1"
class="w-4 h-4 text-green-500"
class="w-4 h-4 text-ink-green-2"
/>
<MinusCircle
v-else-if="answer == 2"
class="w-4 h-4 text-green-500"
class="w-4 h-4 text-ink-green-2"
/>
<XCircle
v-else-if="answer == 0"
class="w-4 h-4 text-red-500"
class="w-4 h-4 text-ink-red-3"
/>
<MinusCircle v-else class="w-4 h-4" />
</div>
@@ -164,12 +164,12 @@
<div v-if="showAnswers.length">
<Badge v-if="showAnswers[0]" :label="__('Correct')" theme="green">
<template #prefix>
<CheckCircle class="w-4 h-4 text-green-500 mr-1" />
<CheckCircle class="w-4 h-4 text-ink-green-2 mr-1" />
</template>
</Badge>
<Badge v-else theme="red" :label="__('Incorrect')">
<template #prefix>
<XCircle class="w-4 h-4 text-red-500 mr-1" />
<XCircle class="w-4 h-4 text-ink-red-3 mr-1" />
</template>
</Badge>
</div>
@@ -181,11 +181,11 @@
@change="(val) => (possibleAnswer = val)"
:editable="true"
:fixedMenu="true"
editorClass="prose-sm max-w-none border-b border-x bg-gray-100 rounded-b-md py-1 px-2 min-h-[7rem]"
editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem]"
/>
</div>
<div class="flex items-center justify-between mt-4">
<div class="text-sm text-gray-600">
<div class="text-sm text-ink-gray-5">
{{
__('Question {0} of {1}').format(
activeQuestion,
@@ -316,6 +316,9 @@ const quiz = createResource({
},
cache: ['quiz', props.quizName],
auto: true,
transform(data) {
data.duration = parseInt(data.duration)
},
onSuccess(data) {
populateQuestions()
setupTimer()

View File

@@ -2,7 +2,7 @@
<div class="flex flex-col justify-between h-full">
<div>
<div class="flex itemsc-center justify-between">
<div class="text-xl font-semibold leading-none mb-1">
<div class="text-xl font-semibold leading-none mb-1 text-ink-gray-9">
{{ __(label) }}
</div>
<Badge
@@ -12,7 +12,7 @@
theme="orange"
/>
</div>
<div class="text-xs text-gray-600">
<div class="text-xs text-ink-gray-5">
{{ __(description) }}
</div>
</div>

View File

@@ -29,8 +29,8 @@
</CodeEditor>
</div>
<div v-else-if="field.type == 'Upload'">
<div class="text-sm text-gray-600 mb-1">
<div v-else-if="field.type == 'Upload'" class="space-y-2">
<div class="text-sm text-ink-gray-5 mb-1">
{{ __(field.label) }}
</div>
<FileUploader
@@ -54,21 +54,21 @@
<div v-else>
<div class="flex items-center text-sm space-x-2">
<div
class="flex items-center justify-center rounded border border-outline-gray-1 w-[15rem] py-5"
class="flex items-center justify-center rounded border border-outline-gray-modals w-[10rem] py-5"
>
<img :src="data[field.name]?.file_url" class="h-6 rounded" />
</div>
<div class="flex flex-col flex-wrap">
<span class="break-all">
<span class="break-all text-ink-gray-9">
{{ data[field.name]?.file_name }}
</span>
<span class="text-sm text-gray-500 mt-1">
<span class="text-sm text-ink-gray-5 mt-1">
{{ getFileSize(data[field.name]?.file_size) }}
</span>
</div>
<X
@click="data[field.name] = null"
class="bg-gray-200 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
class="bg-surface-gray-5 rounded-md cursor-pointer stroke-1.5 w-5 h-5 p-1 ml-4"
/>
</div>
</div>

View File

@@ -1,8 +1,8 @@
<template>
<button
v-if="link && !link.onlyMobile"
class="flex h-7 cursor-pointer items-center rounded text-gray-800 duration-300 ease-in-out focus:outline-none focus:transition-none focus-visible:rounded focus-visible:ring-2 focus-visible:ring-gray-400"
:class="isActive ? 'bg-white shadow-sm' : 'hover:bg-gray-100'"
class="flex h-7 cursor-pointer items-center rounded text-ink-gray-8 duration-300 ease-in-out focus:outline-none focus:transition-none focus-visible:rounded focus-visible:ring-2 focus-visible:ring-outline-gray-3"
:class="isActive ? 'bg-surface-white shadow-sm' : 'hover:bg-surface-gray-2'"
@click="handleClick"
>
<div
@@ -14,7 +14,7 @@
<span class="grid h-5 w-6 flex-shrink-0 place-items-center">
<component
:is="icons[link.icon]"
class="h-4 w-4 stroke-1.5 text-gray-800"
class="h-4 w-4 stroke-1.5 text-ink-gray-8"
/>
</span>
</slot>
@@ -31,10 +31,10 @@
</span>
<span
v-if="link.count"
class="!ml-auto block text-xs text-gray-600"
class="!ml-auto block text-xs text-ink-gray-5"
:class="
isCollapsed && link.count > 9
? 'absolute top-[2px] right-0 bg-white'
? 'absolute top-[2px] right-0 bg-surface-white'
: ''
"
>
@@ -42,16 +42,16 @@
</span>
<div
v-if="showControls && !isCollapsed"
class="flex items-center space-x-2 !ml-auto block text-xs text-gray-600 group-hover:visible invisible"
class="flex items-center space-x-2 !ml-auto block text-xs text-ink-gray-5 group-hover:visible invisible"
>
<component
:is="icons['Edit']"
class="h-3 w-3 stroke-1.5 text-gray-700"
class="h-3 w-3 stroke-1.5 text-ink-gray-7"
@click.stop="openModal(link)"
/>
<component
:is="icons['X']"
class="h-3 w-3 stroke-1.5 text-gray-700"
class="h-3 w-3 stroke-1.5 text-ink-gray-7"
@click.stop="deletePage(link)"
/>
</div>

View File

@@ -27,7 +27,7 @@ const props = defineProps({
member: {
type: String,
},
base_days: {
days: {
type: Number,
default: 200,
},
@@ -42,7 +42,7 @@ const heatmap = createResource({
makeParams(values) {
return {
member: values.member,
base_days: props.base_days,
base_days: props.days,
}
},
auto: false,
@@ -117,7 +117,7 @@ const chartOptions = computed(() => {
},
tooltip: {
custom: ({ series, seriesIndex, dataPointIndex, w }) => {
return `<div class="text-xs bg-gray-900 text-white font-medium p-1">
return `<div class="text-xs bg-surface-gray-7 text-ink-white font-medium p-1">
<div class="text-center">${heatmap.data.heatmap_data[seriesIndex].data[dataPointIndex].label}</div>
</div>`
},

View File

@@ -1,13 +1,13 @@
<template>
<div>
<div class="mb-1.5 text-sm text-gray-700">
<div class="mb-1.5 text-sm text-ink-gray-7">
{{ __(label) }}
</div>
<div class="flex items-center">
{{ tags }}
<div
v-for="tag in tags?.split(', ')"
class="flex items-center bg-gray-100 p-2 rounded-md mr-2"
class="flex items-center bg-surface-gray-2 p-2 rounded-md mr-2"
>
{{ tag }}
<X

Some files were not shown because too many files have changed in this diff Show More