mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 21:18:01 +02:00
fix playlist reordering
+ fix mediasession handler
This commit is contained in:
parent
9094d21d2c
commit
ab9ebbced0
4 changed files with 582 additions and 534 deletions
|
@ -24,12 +24,10 @@ onMounted(() => {
|
|||
new Sortable(pl.value, {
|
||||
handle: '.pl-handle',
|
||||
animation: 150,
|
||||
onEnd: e => {
|
||||
data.state.urls.splice(
|
||||
e.newIndex,
|
||||
0,
|
||||
data.state.urls.splice(e.oldIndex, 1)[0],
|
||||
);
|
||||
onUpdate: ({ oldIndex, newIndex }) => {
|
||||
const { urls } = data.state;
|
||||
urls.splice(newIndex-1, 0, urls.splice(oldIndex-1, 1)[0]);
|
||||
data.state.urls = urls;
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue