From b75db0949961bb3b8c1b7e3b46e1ad0e4733ae8e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 00:09:47 -0700 Subject: One question fewer on the way in, and an 'or' that means it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sign-in screen stacked 'Connect a signer app' directly above a bunker/nsec field, which reads as two steps rather than two ways in. A divider says which it is. The wizard's second step asked whether you have a nostr account, then sent you to a screen that asks the same thing. Step one now offers both paths directly — Get started, or sign in with Nostr — and the middle step is gone, along with its strings. The welcome blurb goes too: the screen is one decision, and prose above it is something to read before you can make it. The footer sinks to the bottom of the window rather than trailing the content up the page. #app is a full-height column now; the chat card sizes itself against the viewport, so the layout test covers it at three sizes. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/app.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 6871ce8..0477441 100644 --- a/src/app.js +++ b/src/app.js @@ -2120,7 +2120,7 @@ function onboardScreen() { ui.onb ||= { step: 'welcome' }; const o = ui.onb; // steps that were waiting on something advance the moment it exists - if ((o.step === 'nostr' || o.step === 'signin') && ui.screen === 'wallet' && activeAccount()) { + if ((o.step === 'welcome' || o.step === 'signin') && ui.screen === 'wallet' && activeAccount()) { o.step = 'legacy'; o.enterAddr = featureHook('namesAddress') || null; } @@ -2173,28 +2173,20 @@ function onboardScreen() { return page([ h('div', { class: 'onb-hero' }, brandHeader(false)), title(t('onbWelcomeTitle')), - h('p', { class: 'muted', style: 'margin:0;font-size:16px' }, t('onbWelcomeBody')), - h('button', { class: 'btn-primary btn-block', style: 'font-size:17px;padding:14px', onClick: () => { o.step = 'nostr'; render(); } }, t('onbStart')), - h('button', { class: 'linklike small', onClick: () => { ui.onbSkip = true; ui.onb = null; render(); } }, t('onbHaveWallet')), - ]); - } - if (o.step === 'nostr') { - return page([ - h('div', { class: 'onb-mark', html: NOSTR_MARK }), - title(t('onbNostrTitle')), - h('p', { class: 'muted', style: 'margin:0' }, t('onbNostrBody')), - h('button', { class: 'btn-primary btn-block', style: 'padding:14px', onClick: () => { - o.step = 'signin'; - ui.nostrLoginOpen = true; - render(); - } }, t('onbNostrYes')), - h('button', { class: 'btn-block', style: 'padding:14px', disabled: ui.onbBusy, onClick: async () => { + // Starting is the primary path; bringing a nostr account is the + // alternative, offered here rather than as a question of its own. + h('button', { class: 'btn-primary btn-block', style: 'font-size:17px;padding:14px', disabled: ui.onbBusy, onClick: async () => { ui.onbBusy = true; render(); try { await enterWallet(newMnemonic(), '', { generated: true }); } catch (e) { ui.onbError = e.message; } ui.onbBusy = false; render(); - } }, ui.onbBusy ? h('span', { class: 'spinner sm' }) : t('onbNostrNo')), + } }, ui.onbBusy ? h('span', { class: 'spinner sm' }) : t('onbStart')), + h('button', { class: 'btn-block', style: 'padding:14px', onClick: () => { + o.step = 'signin'; + ui.nostrLoginOpen = true; + render(); + } }, t('nlSignIn')), ui.onbError ? h('div', { class: 'notice err' }, ui.onbError) : null, - h('button', { class: 'linklike small', onClick: () => { o.step = 'welcome'; render(); } }, t('back')), + h('button', { class: 'linklike small', onClick: () => { ui.onbSkip = true; ui.onb = null; render(); } }, t('onbHaveWallet')), ]); } if (o.step === 'signin') { @@ -2202,7 +2194,7 @@ function onboardScreen() { h('div', { class: 'onb-mark', html: NOSTR_MARK }), title(t('onbSigninTitle')), featureHook('unlockExtra') || h('div', { class: 'notice err' }, 'nostr login unavailable'), - h('button', { class: 'linklike small', onClick: () => { o.step = 'nostr'; render(); } }, t('back')), + h('button', { class: 'linklike small', onClick: () => { o.step = 'welcome'; render(); } }, t('back')), ]); } if (o.step === 'username') { -- cgit v1.2.3