chore: record sessions while creating courses and lessons

This commit is contained in:
Jannat Patel
2025-05-29 12:48:58 +05:30
parent ad97405e55
commit 13ff6a7304
3 changed files with 16 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ import EditorJS from '@editorjs/editorjs'
import LessonHelp from '@/components/LessonHelp.vue'
import { ChevronRight } from 'lucide-vue-next'
import { getEditorTools, enablePlyr } from '@/utils'
import { capture } from '@/telemetry'
import { capture, startRecording, stopRecording } from '@/telemetry'
import { useOnboarding } from 'frappe-ui/frappe'
const { brand } = sessionStore()
@@ -131,6 +131,7 @@ onMounted(() => {
window.location.href = '/login'
}
capture('lesson_form_opened')
startRecording()
editor.value = renderEditor('content')
instructorEditor.value = renderEditor('instructor-notes')
window.addEventListener('keydown', keyboardShortcut)
@@ -226,6 +227,7 @@ const keyboardShortcut = (e) => {
onBeforeUnmount(() => {
clearInterval(autoSaveInterval)
window.removeEventListener('keydown', keyboardShortcut)
stopRecording()
})
const newLessonResource = createResource({