From 2aba63f5d8ae130bbc8dcfc8089841debbca82c6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 2 Oct 2026 09:39:00 -0700 Subject: Notifications screen links to its settings A Settings button beside the Notifications title opens Settings > Notifications (which kinds buzz this device); browser Back returns. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Dmcrt9KyNDKVWFKnb8BREo --- src/app.js | 2 ++ src/features/messages.js | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 46a7054..4ce3386 100644 --- a/src/app.js +++ b/src/app.js @@ -5751,6 +5751,8 @@ async function importSnapshotFile(e) { const ctx = { h, ui, render, wallet, toast, copy, copyBtn, pasteBtn, blankSend, goBack, canGoBack, goHome, openExternal, showSend, openWalletSettings: (view) => openWalletSettings(view), + // one page of the Settings hub, from anywhere (Notifications' gear) + openSettingsPage: (page) => { clearFeatureNav(); ui.screen = 'wallet'; ui.tab = 'settings'; ui.settingsPage = page; render(); try { window.scrollTo(0, 0); } catch {} }, fmtAmount, unitLabel, unitTag, getUnit: () => unit, toggleUnit, download, // in fiat the typed figure is money, so it needs today's price to become sats parseAmount: (v, u) => parseAmount(v, u, rateNow()), diff --git a/src/features/messages.js b/src/features/messages.js index 765df01..8c01cbe 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -10156,7 +10156,14 @@ export function messagesFeature(ctx) { return h('div', { class: 'card col chat-page', style: 'gap:10px' }, h('div', { class: 'row gap6', style: 'align-items:center' }, backBtn(() => { ui.msgView = 'home'; stopNotifWatch(); render(); }), - h('h3', { style: 'margin:0' }, t('alertsTitle'))), + h('h3', { style: 'margin:0' }, t('alertsTitle')), + // which of these also buzz the phone: Settings → Notifications + ctx.openSettingsPage ? h('button', { + class: 'btn-sm notif-settings', style: 'margin-left:auto;display:inline-flex;align-items:center;gap:6px', + title: t('settingsNotifications'), 'aria-label': t('settingsNotifications'), + onClick: () => { stopNotifWatch(); ctx.openSettingsPage('notifications'); }, + }, h('span', { style: 'display:flex', html: '' }), + t('tabSettings')) : null), c.status === 'loading' && !items.length ? h('div', { class: 'row gap6', style: 'justify-content:center;padding:12px 0' }, h('span', { class: 'spinner sm' })) : !items.length -- cgit v1.2.3