Wire track queue actions
This commit is contained in:
1 parent
d6f8bb8588
commit
13081c4771
1 file changed
+3
-1
@@ -14,7 +14,7 @@ const { track, index, extendedInfo, showImage, queueMode } =
|
|||||||
const emit = defineEmits<{ (e: "playAlbumAtIndex"): void }>()
|
const emit = defineEmits<{ (e: "playAlbumAtIndex"): void }>()
|
||||||
|
|
||||||
const hovering = ref(false)
|
const hovering = ref(false)
|
||||||
const { playAlbum } = usePlayer()
|
const { playAlbum, addToFrontOfQueue, addToQueue } = usePlayer()
|
||||||
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ const dropdownMenuItems: DropdownMenuItem[][] = [
|
|||||||
label: "Play next",
|
label: "Play next",
|
||||||
icon: "lucide:list-start",
|
icon: "lucide:list-start",
|
||||||
onSelect() {
|
onSelect() {
|
||||||
|
addToFrontOfQueue(track)
|
||||||
toast.show("Playing next")
|
toast.show("Playing next")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -38,6 +39,7 @@ const dropdownMenuItems: DropdownMenuItem[][] = [
|
|||||||
label: "Add to queue",
|
label: "Add to queue",
|
||||||
icon: "lucide:list-end",
|
icon: "lucide:list-end",
|
||||||
onSelect() {
|
onSelect() {
|
||||||
|
addToQueue(track)
|
||||||
toast.show("Added to queue")
|
toast.show("Added to queue")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user