From 0f47a16fd81091f03ab1f4e4e8143fedf94d1f68 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 19:12:21 -0700 Subject: Settings: nostr cards move to their own subpage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main page ends with two doors — Nostr settings and Advanced settings. The nostr subpage carries the address, account link, wallet connect, and device sync cards; the inline section heading (and its now-unused string/CSS) is gone. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/app.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index b7a5ab0..be79c4a 100644 --- a/src/app.js +++ b/src/app.js @@ -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(); -- cgit v1.2.3