From 5a602f87ddf314ba603da259e34fd40176e1f375 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 3 Aug 2026 13:26:45 -0700 Subject: Balance card: a real button to change account, not two dots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dots were an indicator pressed into service as a control — fine under a thumb that can just swipe, too small for a mouse. They're replaced by a pill in the header row naming the account it takes you to (⇄ Savings / ⇄ Spending), which is both a proper click target and a clearer answer to "what's the other one?". Swiping the card still works. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/app.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index c528fd7..9e680a2 100644 --- a/src/app.js +++ b/src/app.js @@ -2324,6 +2324,8 @@ function setAccountSel(a, dir) { render(); } +const SWAP_ICON = ''; + function balanceCard() { // Dim + spin until this network has data (cache, Nostr state, or a scan has // populated balances once). `scanning` alone misses the window between @@ -2348,10 +2350,15 @@ function balanceCard() { h('div', { class: 'row between', style: 'align-items:center' }, h('div', { class: 'small faint', style: 'text-transform:uppercase;letter-spacing:.06em' }, hasArk ? (isSpending ? t('spendingLabel') : t('savingLabel')) : t('balance')), + // Swiping only helps on touch, and dots are an indicator rather than a + // target — so the switch is a real button that names where it goes. hasArk - ? h('div', { class: 'balance-dots' }, - h('button', { class: 'bdot' + (isSpending ? ' on' : ''), title: t('spendingLabel'), onClick: () => setAccountSel('spending') }), - h('button', { class: 'bdot' + (!isSpending ? ' on' : ''), title: t('savingLabel'), onClick: () => setAccountSel('savings') })) + ? h('button', { + class: 'balance-switch', + onClick: () => setAccountSel(isSpending ? 'savings' : 'spending', isSpending ? 'left' : 'right'), + }, + h('span', { html: SWAP_ICON }), + h('span', { class: 'bsw-label' }, isSpending ? t('savingLabel') : t('spendingLabel'))) : null), h('div', { class: 'amt', style: firstLoad ? 'opacity:.3' : '' }, firstLoad ? h('span', { class: 'spinner sm', style: 'margin-right:8px' }) : null, -- cgit v1.2.3