From 74d32d3cbd5cbe6e2845317cc9d92ed733813570 Mon Sep 17 00:00:00 2001 From: ferferga Date: Wed, 17 Jun 2020 22:30:59 +0200 Subject: [PATCH] Add repeat button in mobile layout --- src/components/remotecontrol/remotecontrol.css | 2 +- src/components/remotecontrol/remotecontrol.js | 10 ++++++++-- src/nowplaying.html | 8 +++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/remotecontrol/remotecontrol.css b/src/components/remotecontrol/remotecontrol.css index 115fc2c24a..de7e689ac3 100644 --- a/src/components/remotecontrol/remotecontrol.css +++ b/src/components/remotecontrol/remotecontrol.css @@ -290,7 +290,7 @@ border-radius: 0; } - .nowPlayingInfoButtons .btnRewind { + .nowPlayingInfoButtons .btnRepeatMobile { position: absolute; left: 0; margin-left: 0; diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index 89c56090eb..d850d1be60 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -293,8 +293,14 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL buttonVisible(context.querySelector('.btnStop'), null != item); buttonVisible(context.querySelector('.btnNextTrack'), null != item); buttonVisible(context.querySelector('.btnPreviousTrack'), null != item); - buttonVisible(context.querySelector('.btnRewind'), null != item); - buttonVisible(context.querySelector('.btnFastForward'), null != item); + if (layoutManager.mobile) { + buttonVisible(context.querySelector('.btnRewind'), false); + buttonVisible(context.querySelector('.btnFastForward'), false); + buttonVisible(context.querySelector('.nowPlayingInfoButtons').querySelector('.repeatToggleButton'), true); + } else { + buttonVisible(context.querySelector('.btnRewind'), null != item); + buttonVisible(context.querySelector('.btnFastForward'), null != item); + } var positionSlider = context.querySelector('.nowPlayingPositionSlider'); if (positionSlider && item && item.RunTimeTicks) { diff --git a/src/nowplaying.html b/src/nowplaying.html index efeb2526d5..4266b01f01 100644 --- a/src/nowplaying.html +++ b/src/nowplaying.html @@ -29,6 +29,11 @@
+ + -