From 31f8d2f9736b4618ac2227adc6b4a47213c90e1b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Dec 2025 21:39:08 +0000 Subject: [PATCH 1/3] Fix navigation menu tab switching function name Resolved ReferenceError: showView is not defined when clicking sites in nav menu. Changes: - Changed showView() to attachView() - the correct function name - Added manualNavigationMode=true to stop auto-rotation on manual navigation - Added markActivity() to reset inactivity timer - Added inactivityExtensionUntil=0 to clear extensions - Added additional logging for debugging - Added error logging for invalid view indices This makes navigation menu behavior consistent with nextTab() and previousTab() functions throughout the codebase. --- install_kiosk_0.9.8.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install_kiosk_0.9.8.sh b/install_kiosk_0.9.8.sh index c553007..1eb275b 100644 --- a/install_kiosk_0.9.8.sh +++ b/install_kiosk_0.9.8.sh @@ -5306,8 +5306,15 @@ function createWindow(){ } const viewIndex=tabIndexToViewIndex[tabIndex]; if(viewIndex!==undefined&&viewIndex>=0&&viewIndex Date: Tue, 2 Dec 2025 21:45:59 +0000 Subject: [PATCH 2/3] Remove auto-rotation stop from navigation menu Navigation menu now jumps to selected site but allows rotation to continue. The pause button remains the only control for stopping rotation. Changes: - Removed manualNavigationMode=true from navigate-to-tab handler - Removed inactivityExtensionUntil=0 (related to manual mode) - Updated logging to reflect that rotation continues Users can now use the navigation menu to quickly jump to any site while keeping rotation active, or use the pause button if they want to stop on a specific site. --- install_kiosk_0.9.8.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install_kiosk_0.9.8.sh b/install_kiosk_0.9.8.sh index 1eb275b..e77790f 100644 --- a/install_kiosk_0.9.8.sh +++ b/install_kiosk_0.9.8.sh @@ -5307,12 +5307,10 @@ function createWindow(){ const viewIndex=tabIndexToViewIndex[tabIndex]; if(viewIndex!==undefined&&viewIndex>=0&&viewIndex Date: Wed, 3 Dec 2025 01:55:30 +0000 Subject: [PATCH 3/3] Improve navigation menu UX and button behavior Fixed three navigation menu issues: 1. Nav button timeout - now auto-hides after 5 seconds like pause/keyboard buttons 2. Better site selection visual feedback - bolder text, white border, lift effect on hover 3. Independent column scrolling - only sites list scrolls, cheat sheet stays fixed Navigation button changes: - Added navButtonHideTimer and NAV_BUTTON_HIDE_DELAY (5 seconds) - Updated showNavButton() to set auto-hide timer - Updated hideNavButton() to clear timer - Matches pause button behavior for consistent UX Site button styling improvements: - Hover: bold text, bright white border, lifts up 2px, brighter background - Click: even darker background, pressed down effect - Default: subtle border and shadow - Smooth 0.3s transitions for modern feel - Much more obvious visual feedback when hovering/selecting Column scroll changes: - Content overflow changed from auto to hidden - Sites column: overflow-y auto, padding for scrollbar - Cheat sheet column: overflow-y hidden (stays fixed) - Columns container: max-height 70vh - Only URL list scrolls, gestures/shortcuts remain visible --- install_kiosk_0.9.8.sh | 69 ++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/install_kiosk_0.9.8.sh b/install_kiosk_0.9.8.sh index e77790f..a08fdc6 100644 --- a/install_kiosk_0.9.8.sh +++ b/install_kiosk_0.9.8.sh @@ -6197,10 +6197,13 @@ let keyboardVisible=false; let keyboardIcon=null; let navButtonEnabled=true; let navButton=null; +let navButtonShown=false; +let navButtonHideTimer=null; let navMenu=null; let navMenuVisible=false; let navMenuTimer=null; const NAV_MENU_TIMEOUT=30000; // 30 seconds +const NAV_BUTTON_HIDE_DELAY=5000; // Hide after 5 seconds of inactivity // Listen for pause button visibility control from main process // CRITICAL: This must be outside DOMContentLoaded so it doesn't reset on page load @@ -6367,11 +6370,33 @@ window.addEventListener('DOMContentLoaded',()=>{ function showNavButton(){ if(!navButtonEnabled)return; if(!navButton)createNavButton(); - if(navButton)navButton.style.display='flex'; + if(navButton){ + navButton.style.display='flex'; + navButtonShown=true; + } + + // Clear existing hide timer + if(navButtonHideTimer){ + clearTimeout(navButtonHideTimer); + navButtonHideTimer=null; + } + + // Set new hide timer - button will auto-hide after inactivity + navButtonHideTimer=setTimeout(()=>{ + console.log('[NAV-BTN] Auto-hiding after '+NAV_BUTTON_HIDE_DELAY+'ms inactivity'); + hideNavButton(); + },NAV_BUTTON_HIDE_DELAY); } function hideNavButton(){ - if(navButton)navButton.style.display='none'; + if(navButtonHideTimer){ + clearTimeout(navButtonHideTimer); + navButtonHideTimer=null; + } + if(navButton){ + navButton.style.display='none'; + navButtonShown=false; + } } function createNavMenu(){ @@ -6389,7 +6414,7 @@ window.addEventListener('DOMContentLoaded',()=>{ const content=document.createElement('div'); content.style.cssText=` position:relative;background:rgba(44,62,80,0.98);border-radius:20px;padding:40px; - max-width:90%;max-height:90%;overflow-y:auto; + max-width:90%;max-height:90%;overflow:hidden; box-shadow:0 10px 40px rgba(0,0,0,0.5); `; @@ -6410,20 +6435,20 @@ window.addEventListener('DOMContentLoaded',()=>{ content.appendChild(closeBtn); const columns=document.createElement('div'); - columns.style.cssText='display:flex;gap:40px;margin-top:20px;'; + columns.style.cssText='display:flex;gap:40px;margin-top:20px;max-height:70vh;'; - // Column 1: Sites + // Column 1: Sites (scrollable) const sitesCol=document.createElement('div'); - sitesCol.style.cssText='flex:1;min-width:300px;'; + sitesCol.style.cssText='flex:1;min-width:300px;display:flex;flex-direction:column;'; sitesCol.innerHTML='

Sites

'; const sitesList=document.createElement('div'); sitesList.id='nav-sites-list'; - sitesList.style.cssText='display:flex;flex-direction:column;gap:10px;'; + sitesList.style.cssText='display:flex;flex-direction:column;gap:10px;overflow-y:auto;padding-right:10px;'; sitesCol.appendChild(sitesList); - // Column 2: Gesture Cheat Sheet + // Column 2: Gesture Cheat Sheet (fixed, no scroll) const cheatCol=document.createElement('div'); - cheatCol.style.cssText='flex:1;min-width:300px;'; + cheatCol.style.cssText='flex:1;min-width:300px;overflow-y:hidden;'; cheatCol.innerHTML=`

Touch Gestures

@@ -6576,18 +6601,30 @@ window.addEventListener('DOMContentLoaded',()=>{ const displayName=tab.name||tab.url; siteBtn.textContent=displayName; siteBtn.style.cssText=` - padding:15px 20px;background:rgba(52,152,219,0.8);color:white; + padding:15px 20px;background:rgba(52,152,219,0.7);color:white; border-radius:10px;cursor:pointer;font-size:18px; - transition:all 0.2s;border:2px solid transparent; - user-select:none; + transition:all 0.3s;border:3px solid rgba(52,152,219,0.9); + user-select:none;font-weight:normal; + box-shadow:0 2px 8px rgba(0,0,0,0.2); `; siteBtn.addEventListener('mouseenter',()=>{ - siteBtn.style.background='rgba(52,152,219,1)'; - siteBtn.style.borderColor='rgba(255,255,255,0.5)'; + siteBtn.style.background='rgba(41,128,185,1)'; + siteBtn.style.borderColor='rgba(255,255,255,0.9)'; + siteBtn.style.fontWeight='bold'; + siteBtn.style.transform='translateY(-2px)'; + siteBtn.style.boxShadow='0 4px 12px rgba(0,0,0,0.4)'; }); siteBtn.addEventListener('mouseleave',()=>{ - siteBtn.style.background='rgba(52,152,219,0.8)'; - siteBtn.style.borderColor='transparent'; + siteBtn.style.background='rgba(52,152,219,0.7)'; + siteBtn.style.borderColor='rgba(52,152,219,0.9)'; + siteBtn.style.fontWeight='normal'; + siteBtn.style.transform='translateY(0)'; + siteBtn.style.boxShadow='0 2px 8px rgba(0,0,0,0.2)'; + }); + siteBtn.addEventListener('mousedown',()=>{ + siteBtn.style.background='rgba(31,97,141,1)'; + siteBtn.style.transform='translateY(0)'; + siteBtn.style.boxShadow='0 1px 4px rgba(0,0,0,0.3)'; }); siteBtn.addEventListener('click',(e)=>{ e.preventDefault();