mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 16:22:21 +01:00
Merge branch 'feature/improve-queueable' into 'marietje-zuid'
Improvement to the visibility of already queued songs See merge request technicie/MarietjeDjango!96
This commit is contained in:
@ -117,6 +117,11 @@ footer {
|
|||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bootstrap 3 doesn't support equal height columns, hack via <https://medium.com/wdstack/bootstrap-equal-height-columns-d07bc934eb27#892f> */
|
/* Bootstrap 3 doesn't support equal height columns, hack via <https://medium.com/wdstack/bootstrap-equal-height-columns-d07bc934eb27#892f> */
|
||||||
.row.display-flex {
|
.row.display-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -221,7 +221,7 @@
|
|||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
<template v-for="(song, index) in songs">
|
<template v-for="(song, index) in songs">
|
||||||
<tr>
|
<tr v-bind:class="{disabled: is_in_queue(song)}">
|
||||||
<td>
|
<td>
|
||||||
${ song.artist }$
|
${ song.artist }$
|
||||||
</td>
|
</td>
|
||||||
@ -240,7 +240,7 @@
|
|||||||
${ song.duration.secondsToMMSS() }$
|
${ song.duration.secondsToMMSS() }$
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button v-on:click="report_song(song.id);" class="btn btn-link p-0">
|
<button v-on:click="report_song(song.id);" class="btn btn-link p-0" style="pointer-events: auto">
|
||||||
⚑
|
⚑
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
@ -585,6 +585,10 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
is_in_queue(song) {
|
||||||
|
return queue_vue.queue.filter(queuesong => Boolean(queuesong.user)
|
||||||
|
).map((queuesong) => queuesong.song.hash).includes(song.hash);
|
||||||
|
},
|
||||||
|
|
||||||
request_song(song_id) {
|
request_song(song_id) {
|
||||||
fetch('/api/v1/queues/current/request/', {
|
fetch('/api/v1/queues/current/request/', {
|
||||||
|
|||||||
Reference in New Issue
Block a user