From c481e5389e801f7b5fc4902a748aebcf79025607 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 6 Nov 2026 23:38:59 -0700 Subject: Under the "Sign in" heading the ways in just name themselves: Seed phrase, Passkey, Google, Nostr. "I think we can remove 'Sign in' from all the sign in buttons since it's at the top in the heading" (Adam, 2026-11-06). frontDoorSignin takes { short } and the sign-in step asks for it; the coinos.io move page (under "or") and the sign-in sheet in Messages keep the full "Sign in with …" labels, where nothing above says it. "Migrate a coinos account" is unchanged. Tests wait for the list by its last door MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q --- src/features/nostrlogin.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/features/nostrlogin.js') diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js index a4cfa24..4a811fc 100644 --- a/src/features/nostrlogin.js +++ b/src/features/nostrlogin.js @@ -429,20 +429,21 @@ export function nostrLoginFeature(ctx) { } // passkeyFirst: the front door lists the passkey right under the seed // phrase, before Google (Adam, 2026-11-06) - function externalButtons(run, big = false, passkeyFirst = false) { + // short: under a "Sign in" heading the buttons just name the way in + function externalButtons(run, big = false, passkeyFirst = false, short = false) { const hasPasskey = typeof window !== 'undefined' && !!window.PublicKeyCredential && !!navigator.credentials; const pad = big ? 'padding:14px' : ''; const google = [ h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy, onClick: () => googleLogin(run) }, - markedLabel(GOOGLE_MARK, t('nlGoogle'), ui.nostrLoginVia === 'google')), + markedLabel(GOOGLE_MARK, t(short ? 'doorGoogle' : 'nlGoogle'), ui.nostrLoginVia === 'google')), GOOGLE_CENTRAL !== GOOGLE_LEGACY ? h('button', { class: 'linklike small', style: 'align-self:center', disabled: ui.nostrLoginBusy, onClick: () => googleLogin(run, GOOGLE_LEGACY) }, t('nlGooglePrev')) : null, ]; const passkey = hasPasskey ? h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy, - onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t('nlPasskey'), ui.nostrLoginVia === 'passkey')) + onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t(short ? 'doorPasskey' : 'nlPasskey'), ui.nostrLoginVia === 'passkey')) : null; return passkeyFirst ? [passkey, ...google] : [...google, passkey]; } @@ -863,9 +864,9 @@ export function nostrLoginFeature(ctx) { // The front door's ways in, loose: the page spaces them evenly with the // seed-phrase and coinos.io doors around them (a wrapper of their own // put 8px between these and 20px between them and the rest). - frontDoorSignin() { + frontDoorSignin({ short = false } = {}) { return [ - ...externalButtons(loginWith, true, true), + ...externalButtons(loginWith, true, true, short), h('button', { class: 'btn-block', style: 'padding:14px', onClick: () => { if (ui.onb) ui.onb.step = 'signin'; ui.nostrLoginOpen = true; @@ -873,7 +874,7 @@ export function nostrLoginFeature(ctx) { render(); } }, h('span', { style: 'display:flex;align-items:center;justify-content:center;gap:8px' }, h('span', { style: 'display:flex;flex-shrink:0', html: OSTRICH }), - t('nlSignInNostr'))), + t(short ? 'doorNostr' : 'nlSignInNostr'))), ui.nostrLoginError ? h('div', { class: 'notice err' }, ui.nostrLoginError) : null, ].filter(Boolean); }, -- cgit v1.2.3