From 16527520cfda51ee820bb17f2168791d99f1c5f6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 27 Aug 2026 12:05:06 -0700 Subject: Each door leads to its own room: choosing Nostr shows only the nostr ways in — Google and passkey stay on the porch where they already stand, though link and reconnect keep the full set, since a Google-born account needs the same door back MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/features/nostrlogin.js | 12 ++++++++---- src/i18n.js | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js index 9b9d1ef..a084dd1 100644 --- a/src/features/nostrlogin.js +++ b/src/features/nostrlogin.js @@ -287,11 +287,15 @@ export function nostrLoginFeature(ctx) { ]; } - // The ways in, as buttons. `run` receives a signer factory. - function signerButtons(run) { + // The ways in, as buttons. `run` receives a signer factory. The expanded + // "Log in with Nostr" card passes nostrOnly — Google and passkey already + // stand on the front door, and repeating them under a Nostr heading reads + // as noise — while link/reconnect keep them: an account born from a Google + // or passkey sign-in needs the same door to get back in. + function signerButtons(run, { nostrOnly = false } = {}) { const hasExt = typeof window !== 'undefined' && !!window.nostr; return h('div', { class: 'col', style: 'gap:8px' }, - ...externalButtons(run), + ...(nostrOnly ? [] : externalButtons(run)), hasExt ? h('button', { class: 'btn-block', disabled: ui.nostrLoginBusy, onClick: () => run(() => extensionSigner()) }, t('nlExtension')) @@ -346,7 +350,7 @@ export function nostrLoginFeature(ctx) { h('h3', { style: 'margin:0' }, t('nlTitle')), h('span', { class: 'linklike small', onClick: () => { ui.nostrLoginOpen = false; render(); } }, t('cancel'))), h('p', { class: 'small muted', style: 'margin:0' }, t('nlDesc')), - signerButtons(loginWith)); + signerButtons(loginWith, { nostrOnly: true })); } // Re-attach a signer for the account already linked here. Deliberately not diff --git a/src/i18n.js b/src/i18n.js index 8ec64ce..66c4402 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -629,7 +629,7 @@ const STR = { nlWaitingSigner: 'Waiting for your signer to connect…', nlTitle: 'Log in with Nostr', nlSignInNostr: 'Sign in with Nostr', - nlDesc: 'Open the same wallet on any device — with Google, a passkey, or your Nostr account.', + nlDesc: 'Use your Nostr account to open your wallet — on any device, with the same account.', nlExtension: 'Use browser extension', nlGoogle: 'Sign in with Google', nlPasskey: 'Sign in with a passkey', -- cgit v1.2.3