fix: mobile menu overlay, speech bubble timing, TTS static file fallback
- Mobile nav menu now overlays content (absolute positioning) instead of pushing it down - Speech bubbles stay visible for minimum 400ms even when TTS resolves instantly or fails - kokoroPlayCached checks audio cache and loads static files even when Kokoro worker hasn't loaded — fixes TTS not playing on production - CORS_ORIGIN env now supports comma-separated origins - Rename "VIDEO REPLAY" to play icon + "REPLAY" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1a7ad74859
commit
e6b5aa4b9b
@@ -441,8 +441,11 @@ async function _doReplay() {
|
||||
scene.showSpeechBubble('a', round.botAResponse.slice(0, 60), 8)
|
||||
scene.startTalking('a')
|
||||
}
|
||||
// Ensure bubble stays visible for at least 400ms even if TTS resolves instantly
|
||||
const minBubbleA = sleep(400).catch(() => {})
|
||||
if (doTTS) await playAnswerNow(props.fight.botA!.name, round.botAResponse)
|
||||
else await sleep(insanityMode.value ? 30 : 400)
|
||||
await minBubbleA
|
||||
if (!doTTS && !insanityMode.value) await sleep(400)
|
||||
scene?.stopTalking('a')
|
||||
scene?.hideSpeechBubble('a')
|
||||
}
|
||||
@@ -460,8 +463,10 @@ async function _doReplay() {
|
||||
scene.showSpeechBubble('b', round.botBResponse.slice(0, 60), 8)
|
||||
scene.startTalking('b')
|
||||
}
|
||||
const minBubbleB = sleep(400).catch(() => {})
|
||||
if (doTTS) await playAnswerNow(props.fight.botB!.name, round.botBResponse)
|
||||
else await sleep(insanityMode.value ? 30 : 400)
|
||||
await minBubbleB
|
||||
if (!doTTS && !insanityMode.value) await sleep(400)
|
||||
scene?.stopTalking('b')
|
||||
scene?.hideSpeechBubble('b')
|
||||
}
|
||||
@@ -809,7 +814,11 @@ async function _doReplay() {
|
||||
:disabled="isReplaying"
|
||||
@click="replay"
|
||||
>
|
||||
{{ isReplaying ? 'FIGHTING...' : 'VIDEO REPLAY' }}
|
||||
<span v-if="isReplaying">FIGHTING...</span>
|
||||
<span v-else class="flex items-center gap-1.5">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-3.5 h-3.5"><path d="M8 5v14l11-7z"/></svg>
|
||||
REPLAY
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="w-8 h-8 flex items-center justify-center border border-border/50 text-text-muted
|
||||
|
||||
@@ -85,7 +85,7 @@ const bottomNav = [
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="isMenuOpen" class="md:hidden border-t border-border px-6 py-4 space-y-4 bg-surface">
|
||||
<div v-if="isMenuOpen" class="md:hidden absolute left-0 right-0 top-full border-t border-border px-6 py-4 space-y-4 bg-surface/95 backdrop-blur-md z-50">
|
||||
<RouterLink
|
||||
v-for="link in links"
|
||||
:key="link.to"
|
||||
|
||||
Reference in New Issue
Block a user