From b44108f70c7ba984bb9a02cd28749390f4af8213 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Wed, 5 Aug 2026 13:16:41 -0400 Subject: [PATCH] Run one slideshow timer, not two, and honour each slide's own duration A site added two slides to the lobby display and it never changed between them. onMounted awaited fetchSlides, which starts the slideshow itself once it has more than one slide, and then started it AGAIN unconditionally. Two timer chains ran, and the second assignment to slideTimer lost the handle to the first, so nothing could ever cancel it. Both fired about ten seconds later, milliseconds apart, and each advanced one slide. With exactly two slides that is 0 -> 1 -> 0 every cycle: the display looked frozen. With three or more it advanced by two and merely skipped one, which is why this survived so long - and why adding a third slide would have appeared to "fix" it. onMounted no longer starts it; fetchSlides owns that. scheduleNextSlide also cancels any pending timer before setting a new one, so a future double-call replaces the chain rather than leaking an untracked one. While here: the feed has always sent a per-slide duration and the display ignored it, hardcoding ten seconds, so a slide set to hold for a minute changed after ten. It now uses the slide's own value, and the progress bar animates over that same duration instead of finishing early and sitting full. --- plugins/slides/frontend/views/TVDashboard.vue | 398 +++++++++--------- 1 file changed, 207 insertions(+), 191 deletions(-) diff --git a/plugins/slides/frontend/views/TVDashboard.vue b/plugins/slides/frontend/views/TVDashboard.vue index 327100e..6a2ad27 100644 --- a/plugins/slides/frontend/views/TVDashboard.vue +++ b/plugins/slides/frontend/views/TVDashboard.vue @@ -1,191 +1,207 @@ - - - - - + + + + +