1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-02-04 21:29:20 +00:00

Feat: display queued items in bottom bar

This commit is contained in:
jcorporation 2018-11-11 22:22:48 +00:00
parent 9ca519c69a
commit add9d4daf0
2 changed files with 4 additions and 1 deletions

View File

@ -531,7 +531,7 @@
<nav class="navbar navbar-expand navbar-dark fixed-bottom bg-dark">
<div class="d-flex flex-fill navbar-nav" id="navbar-bottom">
<div id="navPlayback" class="nav-item flex-fill text-center"><a data-href='{"cmd": "appGoto", "options": ["Playback"]}' class="nav-link" href="#">Playback</a></div>
<div id="navQueue" class="nav-item flex-fill text-center"><a data-href='{"cmd": "appGoto", "options": ["Queue"]}' class="nav-link" href="#">Queue</a></div>
<div id="navQueue" class="nav-item flex-fill text-center"><a data-href='{"cmd": "appGoto", "options": ["Queue"]}' class="nav-link" href="#">Queue <span id="badgeQueueItems" class="badge badge-secondary"></span></a></div>
<div class="nav-item flex-fill text-center" id="navBrowse"><a data-href='{"cmd": "appGoto", "options": ["Browse"]}' class="nav-link" href="#">Browse</a></div>
<div class="nav-item flex-fill text-center" id="navSearch"><a data-href='{"cmd": "appGoto", "options": ["Search"]}' class="nav-link" href="#">Search</a></div>
</div>

View File

@ -82,6 +82,7 @@ domCache.currentCover = document.getElementById('currentCover');
domCache.currentTitle = document.getElementById('currentTitle');
domCache.btnVoteUp = document.getElementById('btnVoteUp');
domCache.btnVoteDown = document.getElementById('btnVoteDown');
domCache.badgeQueueItems = document.getElementById('badgeQueueItems');
var modalConnectionError = new Modal(document.getElementById('modalConnectionError'), { backdrop: 'static', keyboard: false});
var modalSettings = new Modal(document.getElementById('modalSettings'));
@ -1393,6 +1394,8 @@ function parseState(obj) {
for (var i = 0; i < domCache.btnsPlayLen; i++)
domCache.btnsPlay[i].removeAttribute('disabled');
domCache.badgeQueueItems.innerText = obj.data.queueLength;
//Set volume
parseVolume(obj);