aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/app.js b/src/app.js
index fff5b04..5b57f37 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1502,7 +1502,6 @@ function createPane() {
return h(
'div',
{ class: 'col' },
- h('div', { class: 'warn-box' }, t('writeDownWarn')),
h(
'div',
{ class: 'words', style: '--rows-3:' + Math.ceil(words.length / 3) + ';--rows-2:' + Math.ceil(words.length / 2) },
@@ -1630,7 +1629,7 @@ function entropyPage() {
// tabs, backing out of the entropy page, going home. Whatever you come back
// to is empty. (An opened wallet clears these too, in openWallet/lock.)
function clearSeedDrafts() {
- ui.importText = ''; ui._entropyFilled = null;
+ ui.importText = ''; ui._entropyFilled = null; ui.passOpen = false;
ui.entropyEntry = ''; ui.ownEntropy = ''; ui.importEntropy = '';
}
@@ -1668,18 +1667,28 @@ function importPane() {
}
function optionsPanel() {
+ // Most people want no passphrase, and an empty field labelled "Passphrase"
+ // under the seed reads as a required password. It waits behind a button,
+ // and once opened says it's optional (Adam, 2026-11-06). A passphrase
+ // already typed keeps it open.
+ if (!ui.passOpen && !ui.passphrase) {
+ return [h('button', {
+ class: 'btn-ghost btn-sm', type: 'button', style: 'align-self:flex-start',
+ onClick: (e) => { e.preventDefault(); ui.passOpen = true; render(); },
+ }, t('addPassphrase'))];
+ }
const pass = h(
'label',
{ class: 'field' },
h('span', { class: 'lab' },
- t('passphrase'),
+ t('passphraseOptional'),
// People assume a password logs in or encrypts; a BIP39 passphrase does
// neither, and getting that wrong loses money — worth a sentence here.
h('button', {
class: 'linklike small', type: 'button', style: 'margin-left:8px',
onClick: (e) => { e.preventDefault(); ui.passInfoOpen = !ui.passInfoOpen; render(); },
}, t('passWhatsThis'))),
- ui.passInfoOpen ? h('p', { class: 'small muted', style: 'margin:0 0 6px' }, t('passInfo')) : null,
+ ui.passInfoOpen ? h('p', { class: 'small muted', style: 'margin:0 0 6px' }, t('passInfo')) : h('p', { class: 'small muted', style: 'margin:0 0 6px' }, t('passOptionalHint')),
h(
'div',
{ class: 'input-group' },
@@ -2800,7 +2809,7 @@ function lock({ offerPassword = false } = {}) {
ui.entropyEntry = '';
ui.ownEntropy = '';
ui.importEntropy = '';
- ui.passphrase = '';
+ ui.passphrase = ''; ui.passOpen = false;
ui.confirmPass = '';
ui.confirm = [];
ui.revealShown = false;
@@ -3484,7 +3493,7 @@ function accountsScreen() {
if (aw.from === 'new') {
ui.newWalletKind = kind;
ui.addWallet = null;
- ui.draftMnemonic = ''; ui.createStep = 'gen'; ui.confirm = []; ui.passphrase = ''; ui.confirmPass = '';
+ ui.draftMnemonic = ''; ui.createStep = 'gen'; ui.confirm = []; ui.passphrase = ''; ui.confirmPass = ''; ui.passOpen = false;
ui.showPass = false; ui.screen = 'unlock'; ui.unlockTab = 'create'; ui.fromWallet = true; ui.unlockError = '';
render();
} else {
@@ -4285,7 +4294,6 @@ function onboardScreen() {
return page([
title(t('onbBackupTitle')),
h('p', { class: 'muted', style: 'margin:0' }, t('onbBackupBody')),
- h('div', { class: 'warn-box' }, t('writeDownWarn')),
h('div', { class: 'words', style: '--rows-3:' + Math.ceil(words.length / 3) + ';--rows-2:' + Math.ceil(words.length / 2) }, words.map((w, i) =>
h('div', { class: 'w' }, h('span', { class: 'n' }, i + 1), h('span', { class: 't' }, w)))),
h('div', { class: 'row gap6' }, copyBtn(acc.mnemonic, t('copyPhrase'))),