fix: misc issues

This commit is contained in:
Jannat Patel
2025-06-26 16:35:03 +05:30
parent d60a7e8c94
commit 21f122ee82
3 changed files with 15 additions and 21 deletions

View File

@@ -171,6 +171,8 @@ const tabsStructure = computed(() => {
name: 'livecode_url',
doctype: 'Livecode URL',
type: 'text',
description:
'https://docs.frappe.io/learning/falcon-self-hosting-guide',
},
{
label: 'Unsplash Access Key',

View File

@@ -135,12 +135,17 @@
}"
>
<template #body>
<div class="p-5 text-base">
{{
__(
'Complete the upcoming quiz to continue watching the video. The quiz will open in {0} {1}.'
).format(quizLoadTimer, quizLoadTimer === 1 ? 'second' : 'seconds')
}}
<div class="flex flex-col space-y-2 p-5 text-base leading-5">
<span class="font-semibold">
{{ __('Time for a Quiz') }}
</span>
<span>
{{
__(
'Complete the upcoming quiz to continue watching the video. The quiz will open in {0} {1}.'
).format(quizLoadTimer, quizLoadTimer === 1 ? 'second' : 'seconds')
}}
</span>
</div>
</template>
</Dialog>
@@ -212,6 +217,7 @@ const updateCurrentTime = () => {
}
watch(quizLoadTimer, () => {
console.log(showQuizLoader.value, quizLoadTimer.value, showQuiz.value)
if (quizLoadTimer.value > 0) {
showQuizLoader.value = true
setTimeout(() => {
@@ -303,7 +309,7 @@ const toggleFullscreen = () => {
}
const getQuizMarkerStyle = (time) => {
const percentage = ((time - 7) / Math.ceil(duration.value)) * 100
const percentage = ((time - 5) / Math.ceil(duration.value)) * 100
return {
left: `${percentage}%`,
}

View File

@@ -284,20 +284,6 @@ watch(
)
const loadFalcon = () => {
if (livecodeURL.data.includes('falcon.frappe.io') && !user.data?.is_fc_site) {
falconError.value = __(
'Only Frappe Cloud sites can use Falcon Live Code. Please migrate your site to Frappe Cloud or setup Falcon Live Code on your own server.'
)
return
} else if (livecodeURL.data) {
falconURL.value = livecodeURL.data
} else if (!livecodeURL.data && !user.data?.is_fc_site) {
falconError.value = __(
'Live Code URL is not set. Please set it from the Settings.'
)
return
}
return new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = `${falconURL.value}static/livecode.js`