Add repeat button in mobile layout

This commit is contained in:
ferferga 2020-06-17 22:30:59 +02:00
parent 8b4b67254a
commit 74d32d3cbd
3 changed files with 16 additions and 4 deletions

View File

@ -290,7 +290,7 @@
border-radius: 0; border-radius: 0;
} }
.nowPlayingInfoButtons .btnRewind { .nowPlayingInfoButtons .btnRepeatMobile {
position: absolute; position: absolute;
left: 0; left: 0;
margin-left: 0; margin-left: 0;

View File

@ -293,8 +293,14 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
buttonVisible(context.querySelector('.btnStop'), null != item); buttonVisible(context.querySelector('.btnStop'), null != item);
buttonVisible(context.querySelector('.btnNextTrack'), null != item); buttonVisible(context.querySelector('.btnNextTrack'), null != item);
buttonVisible(context.querySelector('.btnPreviousTrack'), null != item); buttonVisible(context.querySelector('.btnPreviousTrack'), null != item);
buttonVisible(context.querySelector('.btnRewind'), null != item); if (layoutManager.mobile) {
buttonVisible(context.querySelector('.btnFastForward'), null != item); 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'); var positionSlider = context.querySelector('.nowPlayingPositionSlider');
if (positionSlider && item && item.RunTimeTicks) { if (positionSlider && item && item.RunTimeTicks) {

View File

@ -29,6 +29,11 @@
<div class="nowPlayingButtonsContainer focuscontainer-x"> <div class="nowPlayingButtonsContainer focuscontainer-x">
<div class="nowPlayingInfoButtons"> <div class="nowPlayingInfoButtons">
<button is="paper-icon-button-light" class="btnRepeatMobile btnCommand repeatToggleButton autoSize hide" title="${ButtonRepeat}"
data-command="SetRepeatMode">
<span class="material-icons repeat"></span>
</button>
<button is="paper-icon-button-light" class="btnRewind btnNowPlayingRewind btnPlayStateCommand autoSize" title="${Rewind}"> <button is="paper-icon-button-light" class="btnRewind btnNowPlayingRewind btnPlayStateCommand autoSize" title="${Rewind}">
<span class="material-icons replay_10"></span> <span class="material-icons replay_10"></span>
@ -72,7 +77,8 @@
<span class="material-icons fullscreen"></span> <span class="material-icons fullscreen"></span>
</button> </button>
<button is="paper-icon-button-light" class="btnCommand repeatToggleButton autoSize" title="${ButtonRepeat}" data-command="SetRepeatMode"> <button is="paper-icon-button-light" class="btnCommand repeatToggleButton autoSize" title="${ButtonRepeat}"
data-command="SetRepeatMode">
<span class="material-icons repeat"></span> <span class="material-icons repeat"></span>
</button> </button>