fix: mobile nostr signer detection, mobile TTS auto-unlock, button loaders
- Nostr signer: poll for window.nostr up to 3s on mobile (Amber injects late). Both login() and handleSignerLogin() now wait before failing. - Mobile TTS: install global one-time click/touch/keydown handler to auto-unlock AudioContext when fight pages mount. Previously only triggered by explicit sound toggle, so mobile TTS silently failed. - Add loading spinners to "I BUILD BOTS" and "I FIGHT MYSELF" buttons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4897335686
commit
dd3cbdae7f
@@ -7,7 +7,7 @@ import {
|
||||
announceFinishHim, announceFlawlessVictory,
|
||||
sfxCrowdCheer, sfxCrowdGasp, sfxCrowdOoh, sfxApplause, sfxDrumRoll,
|
||||
setMusicIntensity, stopAllAudio,
|
||||
setMasterMute, isMasterMuted, ensureAudioContext,
|
||||
setMasterMute, isMasterMuted, ensureAudioContext, installAutoUnlock,
|
||||
speakQuestion, speakAnswer, speakNarration,
|
||||
prefetchQuestion, prefetchAnswer, prefetchNarration,
|
||||
awaitQuestionReady, awaitAnswerReady,
|
||||
@@ -144,6 +144,9 @@ function togglePerfMode() {
|
||||
const logItems = ref<{ type: string; round: number; text: string; color: string }[]>([])
|
||||
|
||||
onMounted(async () => {
|
||||
// Auto-unlock AudioContext on first user interaction (critical for mobile TTS)
|
||||
if (soundOn.value) installAutoUnlock()
|
||||
|
||||
if (props.autoplay) {
|
||||
// Fresh fight — replay() will call initScene(), no need to double-init
|
||||
await nextTick()
|
||||
|
||||
Reference in New Issue
Block a user