aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.js48
-rw-r--r--src/i18n.js3
2 files changed, 33 insertions, 18 deletions
diff --git a/src/app.js b/src/app.js
index 2d29c4f..a7ab2fb 100644
--- a/src/app.js
+++ b/src/app.js
@@ -891,7 +891,10 @@ function renderInner() {
// not inside it — the page's entrance animation transforms it, and a
// transform makes fixed descendants position within the page.
const floaters = h('div', { class: 'page-floaters', style: 'display:contents' }, ...featureAll('pageFloaters'));
- morphChildren(root, [screen, floaters, footer(), ...(bottomNav ? [bottomNav] : []), ...(side ? [side] : []), ...(ui.lightbox ? [imageViewer()] : []), ...(callOv ? [callOv] : [])]);
+ // The front door is two choices and nothing else: no credits, pickers or
+ // build stamp under them (the language follows the browser's).
+ const frontDoor = !activeAccount() && ui.screen === 'unlock' && ui.onb && ['welcome', 'doors', 'migrate'].includes(ui.onb.step);
+ morphChildren(root, [screen, floaters, ...(frontDoor ? [] : [footer()]), ...(bottomNav ? [bottomNav] : []), ...(side ? [side] : []), ...(ui.lightbox ? [imageViewer()] : []), ...(callOv ? [callOv] : [])]);
promoteLazySrc(root); // sources on the nodes that actually made it into the page
try { document.documentElement.classList.toggle('no-scroll', !!(ui.lightbox || ui.mediaPager)); } catch {}
if (fpath) {
@@ -4184,23 +4187,34 @@ function onboardScreen() {
h('span', { style: 'display:flex;flex-shrink:0', html: NOSTR_MARK }),
t('nlSignIn')));
if (o.step === 'welcome') {
+ // Two ways in, nothing else: a new wallet, or one you already have. The
+ // front page had grown a door per sign-in method (Google, passkey, Nostr,
+ // twelve words, coinos.io) and read as a form; they now wait one step
+ // further in, behind the choice that leads to them.
return page([
h('div', { class: 'onb-hero' }, brandHeader(false)),
title(t('onbWelcomeTitle')),
- // Making your own keys is the path; a sign-in is the alternative,
- // below the line.
h('button', {
// a stable hook for tests, so this button survives its own copy
id: 'onb-create',
class: 'btn-primary btn-block', style: 'font-size:17px;padding:14px', onClick: startCreate,
}, t('onbStart')),
- h('div', { class: 'onb-or' }, h('span', {}, t('onbOrSignIn'))),
- signinDoors(),
- // Bringing a wallet from another device: its twelve words, typed in.
- // This used to hide as a line under the freshly minted words behind
+ h('button', {
+ id: 'onb-signin',
+ class: 'btn-block', style: 'font-size:17px;padding:14px',
+ onClick: () => { ui.onbError = ''; o.step = 'doors'; render(); },
+ }, t('onbSignInExisting')),
+ ui.onbError ? h('div', { class: 'notice err' }, ui.onbError) : null,
+ ]);
+ }
+ if (o.step === 'doors') {
+ return page([
+ h('div', { class: 'onb-hero' }, brandHeader(false)),
+ title(t('onbSigninTitle')),
+ // The seed phrase first: it IS the wallet, and works anywhere. It
+ // used to hide as a line under the freshly minted words behind
// "Create a new wallet", where a person signing in on their second
- // phone found it only by chance (user feedback, 2026-11-02). Its own
- // door, straight to the import pane.
+ // phone found it only by chance (user feedback, 2026-11-02).
h('button', { id: 'onb-restore', class: 'btn-block', style: 'padding:14px', onClick: () => {
clearSeedDrafts();
ui.unlockTab = 'import';
@@ -4209,17 +4223,17 @@ function onboardScreen() {
o.step = 'seed';
render();
} }, t('onbRestoreDoor')),
- // The move from the original coinos.io used to wait behind the
- // Spending offer, where nobody looking for it found it. Its own door
- // on the front page: 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.
+ signinDoors(),
+ // 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.
h('button', { id: 'onb-migrate', class: 'btn-block', style: 'padding:14px', onClick: () => {
try { localStorage.setItem(MIGRATE_LINK_KEY, String(Date.now())); } catch {}
ui.onbError = '';
o.step = 'migrate';
render();
} }, t('onbMigrateDoor')),
+ h('button', { class: 'linklike small', onClick: () => { ui.onbError = ''; o.step = 'welcome'; render(); } }, t('back')),
ui.onbError ? h('div', { class: 'notice err' }, ui.onbError) : null,
]);
}
@@ -4236,7 +4250,7 @@ function onboardScreen() {
}, t('onbMigrateCreate')),
h('div', { class: 'onb-or' }, h('span', {}, t('onbOrSignIn'))),
signinDoors(),
- h('button', { class: 'linklike small', onClick: () => { endMigrateLink(); ui.onbError = ''; o.step = 'welcome'; render(); } }, t('back')),
+ h('button', { class: 'linklike small', onClick: () => { endMigrateLink(); ui.onbError = ''; o.step = 'doors'; render(); } }, t('back')),
ui.onbError ? h('div', { class: 'notice err' }, ui.onbError) : null,
]);
}
@@ -4286,7 +4300,7 @@ function onboardScreen() {
title(t(ui.unlockTab === 'import' ? 'onbRestoreTitle' : 'onbSeedTitle')),
unlockCard(),
// the entropy page brings its own Back — one is enough
- ui.entropyPage ? null : h('button', { class: 'linklike small', onClick: () => { ui.unlockError = ''; o.step = 'welcome'; render(); } }, t('back')),
+ ui.entropyPage ? null : h('button', { class: 'linklike small', onClick: () => { ui.unlockError = ''; o.step = ui.unlockTab === 'import' ? 'doors' : 'welcome'; render(); } }, t('back')),
]);
}
if (o.step === 'signin') {
@@ -4294,7 +4308,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 = 'welcome'; render(); } }, t('back')),
+ h('button', { class: 'linklike small', onClick: () => { o.step = 'doors'; render(); } }, t('back')),
]);
}
if (o.step === 'spend') {
diff --git a/src/i18n.js b/src/i18n.js
index 36beef0..a6aafdb 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -1402,7 +1402,8 @@ const STR = {
backupReminderGo: 'Write it down',
onbSeedTitle: 'Set up your wallet',
onbRestoreTitle: 'Restore your wallet',
- onbRestoreDoor: 'Restore from twelve words',
+ onbRestoreDoor: 'Sign in with seed phrase',
+ onbSignInExisting: 'Sign in to an existing account',
onbSigninTitle: 'Sign in',
onbLegacyTitle: 'Move your coinos.io account',
onbLegacyBody: 'The original coinos. We can move your balance over and point your username here. Your old account keeps working, it just stops receiving payments.',