From 8c77e547dccb1284818ed2ada6957424ccd341dc Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Fri, 29 May 2026 09:25:11 -0400 Subject: [PATCH] =?UTF-8?q?Login=20picker=20modal=20=E2=80=94=20NIP-07=20a?= =?UTF-8?q?ctive,=20NIP-46=20and=20nsec=20stubbed=20for=20later?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking the "Sign in with Nostr" button used to call window.nostr directly. Now it opens a small picker so users see the three signer options Artstr plans to support, with only NIP-07 actually wired up today. Picker modal (#loginPickerModal) - Three option cards stacked: Browser extension (NIP-07), Remote signer (NIP-46), Paste private key (nsec). Each card shows icon + name + a one-line description of the security model. - NIP-46 + nsec cards rendered at .55 opacity with a "Coming soon" pill, but still clickable so the toast fires and the user knows we noticed they tried. - "New to Nostr? Get started at nostr.how" link at the bottom for onboarding. JS wiring - openLoginPicker / closeLoginPicker — standard show/hide. Backdrop click closes (matches the publish-confirm modal pattern). - loginOptNip07 → closes picker + runs the existing nostrLogin(). - loginOptNip46 / loginOptNsec → toast "Coming soon" explainer. - $('nostrLoginBtn').addEventListener('click', ...) re-routes to openLoginPicker; old direct-nostrLogin wiring removed. When NIP-46 and nsec ship later, the picker options just need their disabled styling dropped and new handlers wired — the modal markup + open/close plumbing stay. Tested via CDP: picker hidden by default, opens on login-button click, NIP-07 option closes picker and calls nostrLogin, NIP-46 option fires the "Coming soon" toast and leaves nostrLogin alone. Co-Authored-By: Claude Opus 4.7 --- src/index.html | 65 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index f4300ab..e42eb91 100644 --- a/src/index.html +++ b/src/index.html @@ -4210,6 +4210,38 @@ + +