mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-04 16:22:48 +08:00
fix(classroom): restore audio-first prompt practice
This commit is contained in:
@@ -990,7 +990,7 @@
|
||||
<v-icon size="16" :class="{ spin: ttsLoading }">
|
||||
{{ ttsLoading ? 'mdi-loading' : 'mdi-volume-high' }}
|
||||
</v-icon>
|
||||
{{ hasSpokenTarget ? 'Play again' : 'Play ATC' }}
|
||||
{{ playPromptLabel }}
|
||||
</button>
|
||||
<button
|
||||
v-if="canPlayPrompt && isSpeaking"
|
||||
@@ -2958,8 +2958,7 @@ const progress = ref<LearnProgress>({})
|
||||
const unlockedModules = ref<string[]>([])
|
||||
|
||||
const canPlayPrompt = computed(() => {
|
||||
const kind = activeLesson.value?.prompt?.kind
|
||||
return kind === 'atc' || kind === 'copy'
|
||||
return Boolean(activeLesson.value?.prompt)
|
||||
})
|
||||
const promptLabel = computed(() => {
|
||||
const kind = activeLesson.value?.prompt?.kind
|
||||
@@ -2967,6 +2966,13 @@ const promptLabel = computed(() => {
|
||||
if (kind === 'copy') return 'Copy / decode'
|
||||
return 'ATC prompt'
|
||||
})
|
||||
const playPromptLabel = computed(() => {
|
||||
if (hasSpokenTarget.value) return 'Play again'
|
||||
const kind = activeLesson.value?.prompt?.kind
|
||||
if (kind === 'atc') return 'Play ATC'
|
||||
if (kind === 'copy') return 'Play audio'
|
||||
return 'Play prompt'
|
||||
})
|
||||
const audioContentHidden = computed(() => canPlayPrompt.value && cfg.value.audioChallenge && !audioReveal.value)
|
||||
const audioSpeedDisplay = computed(() => (cfg.value.audioSpeed ?? 1).toFixed(2))
|
||||
const currentVariantProgressLabel = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user