diff options
| author | Adam Soltys <[email protected]> | 2026-09-04 15:19:15 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-04 15:19:15 -0700 |
| commit | 761bb812cd469e5202f68217878d622b15b630e8 (patch) | |
| tree | 86c04b18237817978799dc5318aca6be79923439 /src | |
| parent | 21a0b57935d81480c009eb83fd829b94b8fd1ade (diff) | |
| download | coinosv3-761bb812cd469e5202f68217878d622b15b630e8.tar.gz coinosv3-761bb812cd469e5202f68217878d622b15b630e8.zip | |
The pager's Prev/Next buttons loop within the pages instead of disabling at the ends: Next on the last page returns to page 1, Prev on page 1 jumps to the end. Unlike the swipe ring they never leave the list for the tabs — buttons paginate, swipes navigate. Applies to the shared pager, so the address list wraps the same way
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -4607,6 +4607,9 @@ function txHistoryItem(tx) { } // Prev / page-of / next controls. Returns null when there's only one page. +// The buttons LOOP within the pages (never disabled): Next on the last page +// returns to page 1, Prev on page 1 jumps to the end — unlike the swipe +// ring, they never leave the list for the tabs. const PAGE_SIZE = 10; // The history list currently on screen ({ page, pages }), null when a detail // view / spinner / another tab is up — the swipe gesture paginates against @@ -4616,9 +4619,9 @@ function pager(page, total, onPage) { const pages = Math.ceil(total / PAGE_SIZE); if (pages <= 1) return null; return h('div', { class: 'row between', style: 'align-items:center;padding-top:10px' }, - h('button', { class: 'btn-sm', disabled: page <= 0, onClick: () => onPage(page - 1) }, t('prevPage')), + h('button', { class: 'btn-sm', onClick: () => onPage((page - 1 + pages) % pages) }, t('prevPage')), h('span', { class: 'small muted' }, t('pageXofY', { x: page + 1, y: pages })), - h('button', { class: 'btn-sm', disabled: page >= pages - 1, onClick: () => onPage(page + 1) }, t('nextPage')) + h('button', { class: 'btn-sm', onClick: () => onPage((page + 1) % pages) }, t('nextPage')) ); } |
