mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
more play now controls
This commit is contained in:
parent
93eca0a283
commit
7ed6a18fc5
@ -140,6 +140,9 @@ function renderFileWithMetadataHtml(filepath, lokiId, metadata) {
|
||||
<span class="explorer-label-1">${(!metadata || !metadata.title) ? filepath : `${metadata.artist} - ${metadata.title}`}</span>
|
||||
</div>
|
||||
<div class="song-button-box">
|
||||
<span title="Play Now" onclick="playNow(this);" data-file_location="${filepath}" class="songDropdown">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="12" width="12" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M15.5 5H11l5 7-5 7h4.5l5-7z"/><path d="M8.5 5H4l5 7-5 7h4.5l5-7z"/></svg>
|
||||
</span>
|
||||
<span data-lokiid="${lokiId}" class="removePlaylistSong" onclick="removePlaylistSong(this);">remove</span>
|
||||
</div>
|
||||
</div>`;
|
||||
@ -156,7 +159,7 @@ function createMusicFileHtml(fileLocation, title, aa, rating) {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="12" width="12" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M15.5 5H11l5 7-5 7h4.5l5-7z"/><path d="M8.5 5H4l5 7-5 7h4.5l5-7z"/></svg>
|
||||
</span>
|
||||
<span title="Add To Playlist" onclick="createPopper3(this);" data-file_location="${fileLocation}" class="fileAddToPlaylist">
|
||||
<svg class="pop-d" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 292.362 292.362"><path class="pop-d" d="M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"/></svg>
|
||||
<svg class="pop-f" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 292.362 292.362"><path class="pop-f" d="M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"/></svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
@ -230,7 +233,12 @@ function addToPlaylistUI(playlist) {
|
||||
}
|
||||
|
||||
function createPopper3(el) {
|
||||
console.log(el);
|
||||
if (curFileTracker === el.getAttribute("data-file_location")) {
|
||||
curFileTracker = undefined;
|
||||
document.getElementById("pop-f").style.visibility = "hidden";
|
||||
return;
|
||||
}
|
||||
|
||||
curFileTracker = el.getAttribute("data-file_location")
|
||||
Popper.createPopper(el, document.getElementById('pop-f'), {
|
||||
placement: 'bottom-end',
|
||||
@ -1136,8 +1144,11 @@ function submitSearchForm() {
|
||||
</div>
|
||||
${
|
||||
key === 'files' || key === 'title' ? `<div class="song-button-box">
|
||||
<span onclick="createPopper3(this);" data-file_location="${value.filepath}" class="fileAddToPlaylist">
|
||||
<svg class="pop-f" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 292.362 292.362"><path class="pop-d" d="M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"/></svg>
|
||||
<span title="Play Now" onclick="playNow(this);" data-file_location="${value.filepath}" class="songDropdown">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="12" width="12" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M15.5 5H11l5 7-5 7h4.5l5-7z"/><path d="M8.5 5H4l5 7-5 7h4.5l5-7z"/></svg>
|
||||
</span>
|
||||
<span title="Add To Playlist" onclick="createPopper3(this);" data-file_location="${value.filepath}" class="fileAddToPlaylist">
|
||||
<svg class="pop-f" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 292.362 292.362"><path class="pop-f" d="M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"/></svg>
|
||||
</span>
|
||||
</div>` : ''
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user