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:
Dorian
2026-03-09 14:44:38 +00:00
co-authored by Claude Opus 4.6
parent 4897335686
commit dd3cbdae7f
5 changed files with 80 additions and 18 deletions
+4 -1
View File
@@ -11,7 +11,7 @@ import {
fanfareRound,
sfxCrowdCheer, sfxApplause, sfxDrumRoll,
announceFinishHim, announceFlawlessVictory, announceDeepIntro,
setMusicIntensity, stopAllAudio, ensureAudioContext, setMasterMute,
setMusicIntensity, stopAllAudio, ensureAudioContext, installAutoUnlock, setMasterMute,
} from '../game/audio'
const route = useRoute()
@@ -444,6 +444,9 @@ watch(liveFightData, async (val) => {
// --- Mount / Unmount ---
onMounted(async () => {
// Auto-unlock AudioContext on first user interaction (critical for mobile TTS)
if (liveSoundOn.value) installAutoUnlock()
let status = await loadFight()
// If fetch failed (offline), try IndexedDB cache