fix(classroom): restore audio-first prompt practice

This commit is contained in:
itsrubberduck
2026-07-27 11:15:01 +02:00
parent 6b43b0134b
commit 42fc743e8f

View File

@@ -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(() => {