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 ++++++++++++++------- src/i18n.js | 2 +- src/style.css | 2 -- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'src') 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(); diff --git a/src/i18n.js b/src/i18n.js index cd802e3..8a39f3d 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -199,7 +199,7 @@ const STR = { msgInviteSent: 'Invite sent', msgLeave: 'Leave community', msgLeaveConfirm: 'Really leave? Rejoining needs a new invite', - nostrSection: 'Nostr', + nostrSettings: 'Nostr settings', advancedSettings: 'Advanced settings', recoveryDesc: 'The twelve words that back up this wallet. Anyone who sees them can steal your funds.', arkOffboardAmtPlaceholder: 'Amount', diff --git a/src/style.css b/src/style.css index 5453420..e5cc666 100644 --- a/src/style.css +++ b/src/style.css @@ -380,8 +380,6 @@ hr.divider { margin: 16px 0; } .chat-bubble.me { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); text-align: left; } .chat-row.dm .chat-time { font-size: 10px; color: var(--faint); margin-top: 2px; } -/* Settings: section heading between card groups. */ -.settings-section { margin: 8px 0 -6px 4px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; } /* Inline move-money panel on the balance card. */ .balance-move { gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; } -- cgit v1.2.3