diff options
| author | Adam Soltys <[email protected]> | 2026-09-27 23:51:27 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-27 23:51:27 -0700 |
| commit | d1b54a9cc8f56a2b62a3c12461261e248948ed5b (patch) | |
| tree | 1a6cff4146110a182cbff14dfc00baa75eeb1dec | |
| parent | d2550b6f16d8207deb8286065fa4cf4b903e8542 (diff) | |
| download | coinosv3-d1b54a9cc8f56a2b62a3c12461261e248948ed5b.tar.gz coinosv3-d1b54a9cc8f56a2b62a3c12461261e248948ed5b.zip | |
Browser Back leaves the Manage and exit pages: they are history entries now, and their own Back pops one.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VhUKyXKtsJ67QAFfb7QR9D
| -rw-r--r-- | src/app.js | 3 | ||||
| -rw-r--r-- | src/features/ark.js | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -730,7 +730,7 @@ wallet.subscribe(scheduleRender); // lightbox: a full-screen photo is a place too — the phone's Back must close // it, not pop the screen under it (which once walked a viewer straight back // to the start page, so the photo's × then looked like a logout). -const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'arkMoveDetail', 'arkReconDetail', 'arkExitDetail', 'giftDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'feedId', 'msgCommunity', 'msgPeer', 'profilePk', 'profEdit', 'profEditFilled', 'profOverThread', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop', 'lightbox']; +const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'arkMoveDetail', 'arkReconDetail', 'arkExitDetail', 'giftDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'feedId', 'arkCoinsPage', 'arkExitPage', 'msgCommunity', 'msgPeer', 'profilePk', 'profEdit', 'profEditFilled', 'profOverThread', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop', 'lightbox']; function navSnapshot() { const s = {}; for (const f of NAV_FIELDS) s[f] = ui[f] ?? null; @@ -1677,6 +1677,7 @@ function identities() { // changes, so the next paint is the app's own screen and not the page the // previous identity (or the unlocked wallet) was reading. function clearFeatureNav() { + ui.arkCoinsPage = null; ui.arkExitPage = null; ui.profilePk = null; ui.profEdit = null; ui.profEditFilled = false; ui.chatOpen = false; ui.userSearch = null; ui.noteThread = null; ui.zapSetup = null; } diff --git a/src/features/ark.js b/src/features/ark.js index 3df3e85..d733e0b 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -2176,7 +2176,7 @@ export function arkFeature(ctx) { const inRound = new Set(renewing.flatMap((a) => a.inputIds || [])); const pendingCoins = ((st && st.vtxos) || []).filter((v) => v.state === 'pending' && inRound.has(v.id)); const tip = (mgr && mgr._tipH) || 0; - const back = () => { ui.arkCoinsPage = null; ui.arkCoinsSel = null; render(); }; + const back = () => ctx.goBack(() => { ui.arkCoinsPage = null; ui.arkCoinsSel = null; }); // the page is a history entry now if (!spend.length && !pendingCoins.length) { ui.arkCoinsPage = null; return null; } // nothing left to manage if (!mgr) connectArk().then(() => render()).catch(() => {}); const totalSat = spend.reduce((n, v) => n + v.amountSat, 0); @@ -3349,7 +3349,7 @@ export function arkFeature(ctx) { .filter((a) => a.type === 'exit' && !['done', 'failed'].includes(a.step)) .reduce((n, a) => n + a.amountSat, 0); const exits = arkExitStatusLines(); - const back = () => { ui.arkExitPage = null; ui.arkError = ''; render(); }; + const back = () => ctx.goBack(() => { ui.arkExitPage = null; ui.arkError = ''; }); return h('div', { class: 'col', style: 'gap:16px' }, h('div', { class: 'card col', style: 'gap:8px' }, h('h3', { class: 'row gap6', style: 'align-items:center;margin:0' }, h('span', { html: ARK_ICON(18) }), t('arkExitPageTitle')), |
