From 2a995ddfca15e4c5c0f07fe716c6ea9639d7c787 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 15 Aug 2026 15:25:34 -0700 Subject: Locking says "Locked" and the locked screen wears the closed gold padlock; Settings lands on a grid of icon tiles instead of a bare list Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv --- src/app.js | 46 ++++++++++++++++++++++++++++++++++++---------- src/i18n.js | 7 +++++++ 2 files changed, 43 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index dd03e05..5eb2eb7 100644 --- a/src/app.js +++ b/src/app.js @@ -1730,7 +1730,7 @@ function lockBtn() { // has no header at all.) return h('button', { class: 'header-msgs', title: t('lockWallet'), 'aria-label': t('lockWallet'), - onClick: () => lock({ offerPassword: true }), + onClick: () => { lock({ offerPassword: true }); toast(t('lockedToast')); }, }, h('span', { class: 'hm-ico', html: '' @@ -1874,20 +1874,39 @@ function settingsTab() { case 'notifications': return page(featureAll('notifySettingsCards')); case 'advanced': return advancedSettingsView(); } - const nav = (id, label) => - h('button', { class: 'btn-block settings-nav', onClick: () => { ui.settingsPage = id; render(); } }, label); + const I = (d) => '' + d + ''; + const TILE_ICONS = { + wallet: I(''), + payments: I(''), + network: I(''), + nostr: I(''), + notifications: I(''), + advanced: I(''), + }; + const tile = (id, label, desc) => + h('button', { + class: 'card col settings-tile', + style: 'align-items:flex-start;gap:6px;text-align:left;padding:14px;cursor:pointer', + onClick: () => { ui.settingsPage = id; render(); }, + }, + h('span', { class: 'st-ico', style: 'color:var(--muted)', html: TILE_ICONS[id] || '' }), + h('span', { style: 'font-weight:600' }, label), + h('span', { class: 'small faint' }, desc)); + const grid = (kids) => h('div', { style: 'display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px' }, ...kids); return h( 'div', { class: 'col', style: 'gap:10px' }, h('div', { class: 'row gap6', style: 'align-items:center;margin:2px 0 6px 4px' }, h('span', { style: 'display:flex;color:var(--muted)', html: '' }), h('h3', { style: 'margin:0' }, t('tabSettings'))), - nav('wallet', t('settingsWallet')), - nav('payments', t('settingsPayments')), - nav('network', t('settingsNetwork')), - nav('nostr', t('nostrSettings')), - nav('notifications', t('settingsNotifications')), - nav('advanced', t('advancedSettings')), + grid([ + tile('wallet', t('settingsWallet'), t('settingsWalletDesc')), + tile('payments', t('settingsPayments'), t('settingsPaymentsDesc')), + tile('network', t('settingsNetwork'), t('settingsNetworkDesc')), + tile('nostr', t('nostrSettings'), t('settingsNostrDesc')), + tile('notifications', t('settingsNotifications'), t('settingsNotifDesc')), + tile('advanced', t('advancedSettings'), t('settingsAdvancedDesc')), + ]), h('button', { class: 'btn-ghost btn-block', style: 'margin-top:6px', onClick: () => { ui.tab = wallet.offline ? 'settings' : 'receive'; render(); } }, t('back')) ); } @@ -2395,7 +2414,14 @@ function vaultScreen() { { class: 'col', style: 'gap:16px' }, brandHeader(false), h('div', { class: 'card col' }, - h('h3', {}, t('unlockSaved')), + h('div', { class: 'row gap6', style: 'align-items:center' }, + h('span', { html: '' + + '' + + '' + + '' + + '' + + '' }), + h('h3', { style: 'margin:0' }, t('unlockSaved'))), h('p', { class: 'small muted', style: 'margin:0' }, t('unlockSavedDesc')), h('input', { type: 'password', placeholder: t('password'), value: ui.vaultPw, onInput: (e) => (ui.vaultPw = e.target.value), onKeyDown: (e) => { if (e.key === 'Enter') unlockVault(); } }), diff --git a/src/i18n.js b/src/i18n.js index ff2b4eb..8c2ad0b 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -671,6 +671,13 @@ const STR = { searchUsers: 'Search', spendingName: 'Spending', manageAccounts: 'Manage accounts', + lockedToast: 'Locked', + settingsWalletDesc: 'Name, keys, backup', + settingsPaymentsDesc: 'Zaps and auto-withdraw', + settingsNetworkDesc: 'Servers and explorers', + settingsNostrDesc: 'Identity and connections', + settingsNotifDesc: 'What buzzes this device', + settingsAdvancedDesc: 'Rarities and rescues', unlockForLabel: 'Stay unlocked', unlockFor5m: '5 minutes', unlockFor30m: '30 minutes', -- cgit v1.2.3