diff options
| author | Adam Soltys <[email protected]> | 2026-08-28 08:29:09 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-28 08:29:09 -0700 |
| commit | 5525d237afc477401a36a9b639a03a73c49c5529 (patch) | |
| tree | 9e7ce96e7206211dc15aba2361416ad5cb961cf0 /src | |
| parent | 7064a5b282f1c8e8d6d3e5fa614013c32921454f (diff) | |
| download | coinosv3-5525d237afc477401a36a9b639a03a73c49c5529.tar.gz coinosv3-5525d237afc477401a36a9b639a03a73c49c5529.zip | |
Arrivals don't slide, only journeys do: the tab pane and balance face animate for deliberate switches alone — the wallet's first frame after sign-in, and a background arkReady revealing Spending, simply appear in place
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -373,6 +373,7 @@ let _swipeDir = null; // set by the swipe handler just before render // tab switches carousel just the content pane, not the whole page let _tabAt = -1e9; let _tabCls = 'anim-tab-left'; +let _tabSeen = false; // a tab has rendered before (slides are for CHANGES, not arrivals) let _prevTabIdx = 0; const _animAt = new Map(); function animWindow(key, val, durMs) { @@ -3035,8 +3036,14 @@ function walletScreen() { const TAB_ORDER = ['receive', 'send', 'history']; if (uiChanged('tabnav', ui.tab)) { const idx = TAB_ORDER.indexOf(ui.tab); - _tabCls = 'anim-tab-' + (_swipeDir || (idx >= 0 && idx < _prevTabIdx ? 'right' : 'left')); - _tabAt = performance.now(); + // The pane slides only BETWEEN tabs the user has seen: the first + // observation after a sign-in (and the handover render itself) is the + // wallet simply appearing, not a navigation. + if (!ui.navAnimSkip && _tabSeen) { + _tabCls = 'anim-tab-' + (_swipeDir || (idx >= 0 && idx < _prevTabIdx ? 'right' : 'left')); + _tabAt = performance.now(); + } + _tabSeen = true; if (idx >= 0) _prevTabIdx = idx; } _swipeDir = null; @@ -3151,6 +3158,7 @@ function accountSel() { return ui.account; } let _accDir = null; // which way the balance face should slide in +let _accAnim = false; // whether the current face switch animates (decided at the switch) function setAccountSel(a, dir) { if (ui.account === a) return; _accDir = dir || (a === 'savings' ? 'left' : 'right'); @@ -3189,7 +3197,12 @@ function balanceCard() { : null; // One balance at a time, full size: the card IS the account you're in, and // everything (receive, gifts) follows it. Swipe or tap the dots to flip. - const dtAcc = animWindow('acct', sel, 300); + const dtRaw = animWindow('acct', sel, 300); + // Decide AT the change whether this face switch animates: only deliberate + // switches (tap/swipe set _accDir) slide — a background flip (arkReady + // arriving and revealing Spending right after sign-in) must not. + if (dtRaw >= 0 && dtRaw < 16.7) _accAnim = !!_accDir && !ui.navAnimSkip; + const dtAcc = _accAnim ? dtRaw : -1; const face = h('div', { class: 'balance-face' }, h('div', { class: 'row between', style: 'align-items:center' }, h('div', { class: 'small faint', style: 'text-transform:uppercase;letter-spacing:.06em' }, |
