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/app.js | |
| 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/app.js')
| -rw-r--r-- | src/app.js | 20 |
1 files changed, 18 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')), |
