diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-26 17:10:11 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-26 17:10:11 +0100 |
commit | 417c403ba8e46dd97ffe656fc8761cb8c6380652 (patch) | |
tree | 208c8d5aa23ca4b8ddc35d2b37159ab4ab07b901 /app/ui/queue.php | |
parent | e1fe55e82cc4af07a5e4544de1629b9d25c9ce2b (diff) | |
download | mist-417c403ba8e46dd97ffe656fc8761cb8c6380652.tar.gz mist-417c403ba8e46dd97ffe656fc8761cb8c6380652.tar.bz2 mist-417c403ba8e46dd97ffe656fc8761cb8c6380652.zip |
Updated 13 files and added app/studio.php (automated)
Diffstat (limited to 'app/ui/queue.php')
-rw-r--r-- | app/ui/queue.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/ui/queue.php b/app/ui/queue.php index 81a7079..7d38625 100644 --- a/app/ui/queue.php +++ b/app/ui/queue.php @@ -25,7 +25,10 @@ <script src="/assets/js/common.js"></script> <div class="container"> <br> - <h2 class="desktop-title" style="margin-top: 10px; margin-bottom: 20px; margin-left: 10px;">Queue</h2> + <h2 class="desktop-title" style="margin-top: 10px; margin-bottom: 20px; margin-left: 10px;"> + Queue + <span class="btn btn-primary" style="float: right;" onclick="clearQueue();">Clear queue</span> + </h2> <div class="list-group" style="margin-left: 10px; margin-top: 20px;" id="main-list"></div> <div class="text-muted" style="margin-left: 10px; margin-top: 20px; display: none;" id="empty"> There are no songs playing next. To add songs to the queue, browse your library and select Add to queue. @@ -33,6 +36,11 @@ </div> <script> + function clearQueue() { + window.parent.playlist = window.parent.playlist.slice(0, window.parent.currentPlaylistPosition + 1); + refreshQueue(); + } + function refreshQueue() { let list = window.parent.playlist.slice(window.parent.currentPlaylistPosition + 1); @@ -68,6 +76,7 @@ function removeSong(index) { window.parent.playlist.splice(index, 1); refreshQueue(); + window.parent.updateDisplay(true); } refreshQueue(); |