diff options
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -1421,8 +1421,8 @@ function addressScanView() { function settingsTab() { if (ui.addrScan && !wallet.offline) return addressScanView(); if (ui.settingsPage === 'advanced') return advancedSettingsView(); + if (ui.settingsPage === 'nostr') return nostrSettingsView(); const a = activeAccount(); - const nostrCards = featureAll('nostrSettingsCards'); return h( 'div', { class: 'col', style: 'gap:16px' }, @@ -1431,16 +1431,23 @@ function settingsTab() { ...featureAll('settingsCards'), networkCard(), explorerCard(), - // Everything nostr — identity, sync, wallet connect — under one heading. - nostrCards.length || (a && nostrNpubCard(a)) - ? h('h3', { class: 'settings-section' }, t('nostrSection')) - : null, - a ? nostrNpubCard(a) : null, - ...nostrCards, + h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.settingsPage = 'nostr'; render(); } }, t('nostrSettings')), h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.settingsPage = 'advanced'; render(); } }, t('advancedSettings')) ); } +// Everything nostr — identity, sync, wallet connect — on its own page. +function nostrSettingsView() { + const a = activeAccount(); + return h( + 'div', + { class: 'col', style: 'gap:16px' }, + a ? nostrNpubCard(a) : null, + ...featureAll('nostrSettingsCards'), + h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.settingsPage = null; render(); } }, t('back')) + ); +} + // Rarely used, easy to fat-finger: offline transfer, address rescan, auto-logout. function advancedSettingsView() { const a = activeAccount(); |
