fix: "after current song" queue option was lost

This commit is contained in:
Phan An 2022-09-25 10:04:41 +07:00
parent e99f2bcbe3
commit d1878d2d02
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
2 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ const playlists = toRef(playlistStore.state, 'playlists')
const allowDownload = toRef(commonStore.state, 'allow_download')
const user = toRef(userStore.state, 'current')
const queue = toRef(queueStore.state, 'songs')
const currentSong = queueStore.current
const currentSong = toRef(queueStore, 'current')
const onlyOneSongSelected = computed(() => songs.value.length === 1)
const firstSongPlaying = computed(() => songs.value.length ? songs.value[0].playback_state === 'Playing' : false)

View file

@ -272,7 +272,7 @@ const rowDragStart = (row: SongRow, event: DragEvent) => {
const allowDrop = (event: DragEvent) => {
if (!allowReordering) return;
(event.target as Element).parentElement.classList.add('droppable')
(event.target as Element).parentElement?.classList.add('droppable')
event.dataTransfer!.dropEffect = 'move'
return false
@ -292,7 +292,7 @@ const handleDrop = (item: SongRow, event: DragEvent) => {
}
const removeDroppableState = (event: DragEvent) => {
(event.target as Element).parentElement.classList.remove('droppable')
(event.target as Element).parentElement?.classList.remove('droppable')
return false
}