← back to Dw Photo Capture
Swipe picker: one trackpad swipe/wheel flick = one theme (Safari skipped two); app chooser shows once per tab, not on every load (TK-12343)
28a13913ef0d6dab950a16463e27c16b4b7c23de · 2026-09-26 11:07:23 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SC2DKkJkSNenmFz2Eqnvpk
Files touched
M public/index.htmlM public/pick.html
Diff
commit 28a13913ef0d6dab950a16463e27c16b4b7c23de
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sat Sep 26 11:07:23 2026 -0700
Swipe picker: one trackpad swipe/wheel flick = one theme (Safari skipped two); app chooser shows once per tab, not on every load (TK-12343)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SC2DKkJkSNenmFz2Eqnvpk
---
public/index.html | 7 ++++++-
public/pick.html | 13 +++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/public/index.html b/public/index.html
index 9435d0a..db086d9 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3027,6 +3027,7 @@ const HOME_KEYS={'1':'add','2':'update','3':'lookup','4':'check'};
function hGet(k,d){ try{ return localStorage.getItem(k)||d; }catch(e){ return d; } }
function hSet(k,v){ try{ localStorage.setItem(k,v); }catch(e){} }
function routeHome(act){ $('#homeScreen').hidden=true; if(act!=='skip') hSet('dwHomeLast',act);
+ try{ sessionStorage.setItem('dwHomeSeen','1'); }catch(e){} // shown once per tab — Steve: "why does this page keep coming up"
// onload → straight to the camera; details show after the first scan
if(act==='add') openAddModal(null,{mode:'add',camera:true});
else if(act==='update') openAddModal(null,{mode:'update',camera:true});
@@ -3079,7 +3080,11 @@ document.addEventListener('keydown',e=>{
else if(e.key==='Escape'){ const p=$('#homePrefs'); if(!p.hidden){ p.hidden=true; $('#homeThemeBtn').setAttribute('aria-expanded','false'); } }
});
$('#homeBtn').addEventListener('click',showHome);
-applyHomeTheme(); if(!$('#homeScreen').hidden) refreshHomeSuggestion();
+applyHomeTheme();
+// Once a task was chosen in this tab, later loads of /app (e.g. "← capture" links, the front picker's
+// "Go to the app") skip the chooser and land on the app; the home button still re-opens it.
+let _homeSeen=false; try{ _homeSeen=sessionStorage.getItem('dwHomeSeen')==='1'; }catch(e){}
+if(_homeSeen) routeHome('skip'); else if(!$('#homeScreen').hidden) refreshHomeSuggestion();
$('#scanvideo').addEventListener('click',resumeScan); // tap the paused overlay to resume scanning
$('#scanStatus').addEventListener('click',resumeScan);
$('#scanCancel').addEventListener('click',closeLiveScan);
diff --git a/public/pick.html b/public/pick.html
index 444ca70..10868ca 100644
--- a/public/pick.html
+++ b/public/pick.html
@@ -197,6 +197,19 @@ footer{display:flex;align-items:center;gap:8px;padding:8px 16px max(12px,env(saf
st = setTimeout(function(){ var i = Math.round(track.scrollLeft / track.clientWidth); if (i !== cur) { cur = i; update(); } }, 90);
}, { passive: true });
+ // Desktop: one trackpad swipe or mouse-wheel flick = exactly one theme. Without this, Safari's
+ // scroll-snap lets a single strong swipe skip two themes, and a vertical-only mouse wheel does nothing.
+ var wheelLock = 0, wheelSum = 0, wheelIdle;
+ window.addEventListener('wheel', function(e){
+ if (live && e.target.closest && e.target.closest('.phone.live')) return; // "Try it" on: let the mockup scroll itself
+ e.preventDefault();
+ var d = Math.abs(e.deltaX) >= Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
+ clearTimeout(wheelIdle); wheelIdle = setTimeout(function(){ wheelSum = 0; }, 180);
+ if (Date.now() < wheelLock) return; // swallow the rest of this gesture's momentum
+ wheelSum += d;
+ if (Math.abs(wheelSum) >= 30) { go(cur + (wheelSum > 0 ? 1 : -1)); wheelSum = 0; wheelLock = Date.now() + 550; }
+ }, { passive: false });
+
$('prev').onclick = function(){ go(cur - 1); };
$('next').onclick = function(){ go(cur + 1); };
$('try').onclick = function(){ setLive(!live); };
← 24bc0c3 Front screen: one-at-a-time swipe theme picker (Figma v1-v25
·
back to Dw Photo Capture
·
Swipe picker: Pick this one opens the theme full screen (Bac 6286a2f →