fix: misc issues
This commit is contained in:
@@ -171,6 +171,8 @@ const tabsStructure = computed(() => {
|
|||||||
name: 'livecode_url',
|
name: 'livecode_url',
|
||||||
doctype: 'Livecode URL',
|
doctype: 'Livecode URL',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
description:
|
||||||
|
'https://docs.frappe.io/learning/falcon-self-hosting-guide',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Unsplash Access Key',
|
label: 'Unsplash Access Key',
|
||||||
|
|||||||
@@ -135,12 +135,17 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #body>
|
<template #body>
|
||||||
<div class="p-5 text-base">
|
<div class="flex flex-col space-y-2 p-5 text-base leading-5">
|
||||||
{{
|
<span class="font-semibold">
|
||||||
__(
|
{{ __('Time for a Quiz') }}
|
||||||
'Complete the upcoming quiz to continue watching the video. The quiz will open in {0} {1}.'
|
</span>
|
||||||
).format(quizLoadTimer, quizLoadTimer === 1 ? 'second' : 'seconds')
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -212,6 +217,7 @@ const updateCurrentTime = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(quizLoadTimer, () => {
|
watch(quizLoadTimer, () => {
|
||||||
|
console.log(showQuizLoader.value, quizLoadTimer.value, showQuiz.value)
|
||||||
if (quizLoadTimer.value > 0) {
|
if (quizLoadTimer.value > 0) {
|
||||||
showQuizLoader.value = true
|
showQuizLoader.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -303,7 +309,7 @@ const toggleFullscreen = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getQuizMarkerStyle = (time) => {
|
const getQuizMarkerStyle = (time) => {
|
||||||
const percentage = ((time - 7) / Math.ceil(duration.value)) * 100
|
const percentage = ((time - 5) / Math.ceil(duration.value)) * 100
|
||||||
return {
|
return {
|
||||||
left: `${percentage}%`,
|
left: `${percentage}%`,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,20 +284,6 @@ watch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const loadFalcon = () => {
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
script.src = `${falconURL.value}static/livecode.js`
|
script.src = `${falconURL.value}static/livecode.js`
|
||||||
|
|||||||
Reference in New Issue
Block a user