2c039f2af3d37d3e6bf474f382f53f39b57bb628
CI / check (push) Failing after 6m19s
Two fixes found during live signer-login verification: 1. hasExtension was `computed(() => !!window.nostr)` — window.nostr is a plain global with no Vue reactivity, so this evaluated once, lazily, on first read and cached forever. If the extension's content script hadn't injected yet at that moment (common — extensions often inject slightly after page scripts start), "SIGN IN WITH EXTENSION" disappeared permanently, even once the extension finished injecting moments later. Reported live as "no browser extension or signer option ever shows". Fixed: hasExtension is now backed by a real ref, seeded from the current value and upgraded by a short poll (existing waitForSigner() precedent, same 200ms/timeout shape) so the UI reacts when the extension actually appears. 2. Added Archipelago's native NIP-07 signer bridge (frontend/public/ nostr-provider.js, copied verbatim from neode-ui/public/nostr-provider.js — the canonical source) via a <script> tag in index.html. This no-ops immediately outside an iframe (window === window.top), so a real browser extension in a standalone tab is unaffected. Inside the Archipelago node dashboard's iframe, it provides window.nostr backed by the node's own identity via postMessage to neode-ui/src/views/appSession/useNostrBridge.ts (already generic — no per-app allowlist needed for the getPublicKey/signEvent bridge itself, only for the optional auto-login/identity-picker convenience flow, which this app doesn't use). Existing login() flow (buildNip98Token -> POST /api/auth/nostr/session) works unchanged through this bridge. Together: signing in now works reliably both in the dashboard iframe (no extension needed at all) and in a direct tab (real extension, now reliably detected). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Description
BotFights — bot competition arena with arcade fighting mode. Main repo (migrated from git.tx1138.com/lfg2025/botfight).
8.9 MiB
Languages
TypeScript
81.6%
Vue
16.7%
JavaScript
1.3%
CSS
0.2%