Commit Graph
8 Commits
Author SHA1 Message Date
Claude cd0bedf9d4 Fix pause button: resend visibility on page load
The pause button wasn't appearing because preload.js variables were being
reset when pages reloaded/navigated, but the visibility message was only
sent once in attachView().

Now sends pause-button-visibility on EVERY page load (did-finish-load event)
to ensure the button state persists across page reloads and navigation.
2025-11-19 22:30:35 +00:00
Claude efeae325cd Fix VERSION constant to 0.9.2 in main.js 2025-11-19 20:54:20 +00:00
Claude 1378d5d92b Add pause button for timed rotation sites (v0.9.2)
Major UX improvement: Replaced problematic home return popup on timed sites
with an on-demand pause button that appears on user interaction.

Changes:
- NEW: Pause button appears in bottom-left corner on user interaction
- Shows only on timed rotation sites (duration > 0)
- Auto-hides after 5 seconds of inactivity
- Reuses existing inactivity prompt logic for pause dialog
- Pause durations: 15 min, 30 min, 1 hour, 2 hours
- Home return popup now ONLY appears on manual sites (duration = 0)
- Timed sites use pause button instead (cleaner UX)

Implementation details:
- Added pause button state/functions to preload.js (outside DOMContentLoaded)
- Added pause-dialog.html with time selection UI
- Added showPauseDialog() function and IPC handler in main.js
- Modified attachView() to send pause-button-visibility based on site duration
- Modified HOME RETURN CHECK to skip timed sites (line 3622-3625)
- Button creation reuses keyboard icon pattern for consistency

This fixes the issue where the home return popup would appear but sites
could rotate under it on timed rotation sites. Now users get a clean,
on-demand pause control that doesn't interfere with normal browsing.
2025-11-19 20:33:14 +00:00
Claude 169264f02e CRITICAL FIX: Move pause button variables outside DOMContentLoaded
Root cause: Pause button state variables and IPC listener were declared inside
DOMContentLoaded, causing them to reset every time a page loaded.

Symptoms:
- Main process sends shouldShow=true when switching to rotation site
- Preload receives it and sets pauseButtonShouldShow=true
- Page loads → DOMContentLoaded fires → variables reset to false
- User taps screen → sees shouldShow=false → no button appears

Fix:
- Moved pause button variables outside DOMContentLoaded (persist across page loads)
- Moved pause button functions outside DOMContentLoaded (called by IPC listener)
- Moved IPC listener outside DOMContentLoaded (registers once, not per page)
- Kept only user interaction handlers inside DOMContentLoaded

This ensures pause button state persists across page navigations within a tab.
2025-11-19 02:45:22 +00:00
Claude 561f7e0574 Fix return-to-home logic, pause button auto-hide, Electron update detection, and display schedule
**Return-to-Home Popup Logic (CORRECTED):**
- FIXED: Return-to-home inactivity prompt now appears ONLY on manual sites (duration=0)
- Rotation sites (duration>0) skip return-to-home logic and use auto-rotation instead
- Previous commit had this backwards - now corrected

**Pause Button Auto-Hide:**
- Pause button now auto-hides after 5 seconds of inactivity (like keyboard icon)
- Each user interaction resets the 5-second timer
- Debug logging shows when button auto-hides
- Prevents button from staying on screen permanently

**Manual Electron Update Detection:**
- Added main.js file check to Method 1 (default kiosk user)
- Added Method 6: Check /opt/kiosk-app and /usr/local/kiosk-app
- Added Method 7: Query systemd kiosk.service for working directory
- Improved parent directory detection with cleaner variable usage
- Enhanced error message with numbered search locations and kiosk user home path
- Better debug output to help diagnose installation issues

**Display Schedule Logic (CRITICAL FIX):**
- FIXED: Reversed display off/on time comparison logic
- Overnight case (22:00 off, 06:00 on): Now correctly checks off_mins > on_mins
- Same-day case (08:00 off, 17:00 on): Now correctly checks off_mins < on_mins
- Display will now properly stay OFF during scheduled times
- Fixes issue where "keep display on" watchdog was too aggressive

All changes improve UX and fix critical scheduling bugs
2025-11-18 20:07:11 +00:00
Claude ae6aede112 Add pause button debug logging and fix inactivity prompt on manual sites
- Add comprehensive console logging for pause button lifecycle:
  * Main process logs when sending visibility updates with duration info
  * Renderer logs visibility changes and user interaction events
  * Helps diagnose why pause button may not appear on rotation sites

- Fix return-to-home inactivity prompt appearing on manual sites:
  * Skip inactivity timeout logic when on manual sites (duration=0)
  * Manual sites should not trigger return-to-home prompts
  * Only rotation sites should show inactivity prompts

These changes help diagnose pause button issues and improve UX for manual sites
2025-11-18 19:54:30 +00:00
Claude 644bfbed7a Fix pause button behavior and Electron update path detection
- Change pause button icon from emoji to proper pause symbol (two vertical bars)
- Update pause button title to 'Pause rotation' for clarity
- Improve pause button logic comments for better code documentation
- Add additional search paths for manual Electron update (HOME, parent dir)
- Enhance manual Electron update error message with more search locations

Fixes pause button display issues and improves kiosk-app detection
2025-11-18 19:31:43 +00:00
Claude 746742ae44 Add install_kiosk_0.9.2.sh installer script
Created new version 0.9.2 installer based on 0.9.1 with updated version references throughout the script.
2025-11-18 18:15:52 +00:00