Merge pull request #1599 from pateljannat/issues-116

fix: misc issues
This commit is contained in:
Jannat Patel
2025-06-26 16:53:06 +05:30
committed by GitHub
3 changed files with 14 additions and 21 deletions

View File

@@ -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',

View File

@@ -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') }}
</span>
<span>
{{ {{
__( __(
'Complete the upcoming quiz to continue watching the video. The quiz will open in {0} {1}.' 'Complete the upcoming quiz to continue watching the video. The quiz will open in {0} {1}.'
).format(quizLoadTimer, quizLoadTimer === 1 ? 'second' : 'seconds') ).format(quizLoadTimer, quizLoadTimer === 1 ? 'second' : 'seconds')
}} }}
</span>
</div> </div>
</template> </template>
</Dialog> </Dialog>
@@ -303,7 +308,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}%`,
} }

View File

@@ -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`