From 03145d05b19427bf1883b46e87d5590c23abe654 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Apr 2026 06:41:15 +0000 Subject: [PATCH] Move autoplay button below player to the left Agent-Logs-Url: https://github.com/mkelvers/mal/sessions/cb3492f9-64b6-4d16-9c7b-11d9e2c647c3 Co-authored-by: melosh101 <59763532+melosh101@users.noreply.github.com> --- static/player.ts | 10 ++++++++-- web/components/watch/video_player.templ | 14 -------------- web/templates/watch.templ | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/static/player.ts b/static/player.ts index fd40cb3..5eac6cd 100644 --- a/static/player.ts +++ b/static/player.ts @@ -182,8 +182,14 @@ const initPlayer = (): void => { const updateAutoplayButton = (): void => { if (!autoplayBtn) return const enabled = isAutoplayEnabled() - autoplayBtn.title = enabled ? 'Autoplay: On' : 'Autoplay: Off' - autoplayBtn.classList.toggle('opacity-40', !enabled) + const label = enabled ? 'Autoplay: On' : 'Autoplay: Off' + autoplayBtn.title = label + autoplayBtn.classList.remove('opacity-40', 'opacity-50') + if (!enabled) autoplayBtn.classList.add('opacity-50') + const lastChild = autoplayBtn.lastChild + if (lastChild && lastChild.nodeType === Node.TEXT_NODE) { + lastChild.textContent = label + } } const timelineBounds = (): { start: number, end: number, duration: number } => { diff --git a/web/components/watch/video_player.templ b/web/components/watch/video_player.templ index 4788076..f2c5434 100644 --- a/web/components/watch/video_player.templ +++ b/web/components/watch/video_player.templ @@ -251,20 +251,6 @@ templ VideoPlayer(data shared.WatchPageData, displayTitle string) { - +
if shared.CanGoPrevEpisode(data.CurrentEpisode) { +