aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.js20
-rw-r--r--src/i18n.js2
2 files changed, 20 insertions, 2 deletions
diff --git a/src/app.js b/src/app.js
index 58e026d..8190bf9 100644
--- a/src/app.js
+++ b/src/app.js
@@ -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",