diff options
| author | Adam Soltys <[email protected]> | 2026-11-06 23:38:59 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-06 23:38:59 -0700 |
| commit | c481e5389e801f7b5fc4902a748aebcf79025607 (patch) | |
| tree | 701370aef413562a67c51ea2db09f39bab6a8dda /src | |
| parent | 5e315005b72a8e9e6670f10b1d30b532763f7fe6 (diff) | |
| download | coinosv3-c481e5389e801f7b5fc4902a748aebcf79025607.tar.gz coinosv3-c481e5389e801f7b5fc4902a748aebcf79025607.zip | |
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
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 4 | ||||
| -rw-r--r-- | src/features/nostrlogin.js | 13 | ||||
| -rw-r--r-- | src/i18n.js | 5 |
3 files changed, 13 insertions, 9 deletions
@@ -4197,7 +4197,7 @@ function onboardScreen() { }; // All the sign-in doors (Google, passkey, Nostr) — the feature supplies // them; the single-button fallback keeps builds without it working. - const signinDoors = () => featureHook('frontDoorSignin') + const signinDoors = (opts) => featureHook('frontDoorSignin', opts) || h('button', { class: 'btn-block', style: 'padding:14px', onClick: () => { o.step = 'signin'; ui.nostrLoginOpen = true; @@ -4246,7 +4246,7 @@ function onboardScreen() { o.step = 'seed'; render(); } }, t('onbRestoreDoor')), - signinDoors(), + signinDoors({ short: true }), // The move from the original coinos.io: it stashes the intent the // /migrate link stashes (the move needs a wallet and a payment address // first) and explains that before any twelve words appear. 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); }, diff --git a/src/i18n.js b/src/i18n.js index ecf0363..e45fa49 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -1405,7 +1405,10 @@ const STR = { backupReminderGo: 'Write it down', onbSeedTitle: 'Set up your wallet', onbRestoreTitle: 'Enter seed phrase', - onbRestoreDoor: 'Sign in with seed phrase', + onbRestoreDoor: 'Seed phrase', + doorPasskey: 'Passkey', + doorGoogle: 'Google', + doorNostr: 'Nostr', onbSignInExisting: 'Sign in to an existing account', onbSigninTitle: 'Sign in', onbLegacyTitle: 'Move your coinos.io account', |
