diff options
| author | Adam Soltys <[email protected]> | 2026-09-21 12:04:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-21 12:04:25 -0700 |
| commit | 9b4fa70a978e3685c9bb2b9a68f855626ac6f39e (patch) | |
| tree | f7c16a131908eed0dc1f7a0571471a7e8b6c125e /src | |
| parent | 56fdf34caeba569e05b70e81a62e5aad16b8d751 (diff) | |
| download | coinosv3-9b4fa70a978e3685c9bb2b9a68f855626ac6f39e.tar.gz coinosv3-9b4fa70a978e3685c9bb2b9a68f855626ac6f39e.zip | |
First run: "Create a new wallet" shows the twelve words at once.
No create/import tabs and no Generate button inside the wizard: the words
appear the moment the button is tapped. Underneath, "Have an existing seed
or entropy to import?" swaps to the import pane (which has its own entropy
door), and "Create a new wallet instead" swaps back with fresh words. The
create/import card elsewhere (adding an account) keeps its tabs. Tests
that entered through the old tab go through the new line.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 20 | ||||
| -rw-r--r-- | src/i18n.js | 2 |
2 files changed, 20 insertions, 2 deletions
@@ -935,17 +935,30 @@ function unlockCard() { // The entropy page takes the card over entirely — seed words, tabs and // other controls step aside until Submit or Back. if (ui.entropyPage) return h('div', { class: 'card col' }, entropyPage()); + // Inside the first-run wizard the words are already on screen: no tabs, + // just a line underneath for whoever brought their own seed (and one back). + const wizard = ui.screen === 'unlock' && ui.onb && ui.onb.step === 'seed'; + const swap = wizard ? h('button', { + class: 'linklike small', style: 'align-self:center', + onClick: () => { + clearSeedDrafts(); ui.unlockError = ''; + if (ui.unlockTab === 'create') ui.unlockTab = 'import'; + else { ui.unlockTab = 'create'; ui.createStep = 'gen'; ui.draftRandom = ui.draftMnemonic = newMnemonic(); } + render(); + }, + }, ui.unlockTab === 'create' ? t('onbHaveSeed') : t('onbCreateInstead')) : null; return h( 'div', { class: 'card col' }, - h( + wizard ? null : h( 'div', { class: 'tabs' }, tabBtn(t('createNew'), ui.unlockTab === 'create', () => { clearSeedDrafts(); ui.unlockTab = 'create'; ui.unlockError = ''; render(); }), tabBtn(t('importExisting'), ui.unlockTab === 'import', () => { clearSeedDrafts(); ui.unlockTab = 'import'; ui.unlockError = ''; render(); }) ), ui.unlockTab === 'create' ? createPane() : importPane(), - ui.unlockError && h('div', { class: 'notice err' }, ui.unlockError) + ui.unlockError && h('div', { class: 'notice err' }, ui.unlockError), + swap ); } @@ -3361,6 +3374,9 @@ function onboardScreen() { class: 'btn-primary btn-block', style: 'font-size:17px;padding:14px', onClick: () => { ui.unlockTab = 'create'; ui.unlockError = ''; + ui.createStep = 'gen'; + // the words are the wallet: show them at once, no Generate to tap + if (!ui.draftMnemonic) ui.draftRandom = ui.draftMnemonic = newMnemonic(); o.step = 'seed'; render(); } }, t('onbStart')), diff --git a/src/i18n.js b/src/i18n.js index b6f7b93..c3fa08b 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -841,6 +841,8 @@ const STR = { onbStart: 'Create a new wallet', onbStartHint: "Takes a minute: write down twelve words and it's yours", onbOrSignIn: 'or', + onbHaveSeed: 'Have an existing seed or entropy to import?', + onbCreateInstead: 'Create a new wallet instead', onbBackupTitle: 'Write down your recovery phrase', onbBackupBody: "Signing in was the easy part — but the sign-in isn't your wallet. These twelve words are. They're the only way back in if you lose access to that account, and nobody can reissue them for you.", onbBackupDone: "I've written it down", |
