[web] Fix playlist page displaying one ghost entry when no playlist are present

When there are no playlists or all of them are filtered out, the list of playlists is now completely empty.
This commit is contained in:
Alain Nussbaumer
2023-07-18 14:08:52 +02:00
parent 19cdd895f0
commit 34ea8115a8
10 changed files with 40 additions and 28 deletions

View File

@@ -3,7 +3,6 @@
v-for="playlist in playlists"
:key="playlist.itemId"
class="media is-align-items-center"
:playlist="playlist"
@click="open_playlist(playlist.item)"
>
<figure class="media-left is-clickable">
@@ -45,13 +44,16 @@ export default {
methods: {
open_playlist(playlist) {
if (playlist.type !== 'folder') {
if (playlist.type === 'folder') {
this.$router.push({
name: 'playlist-tracks',
name: 'playlist-folder',
params: { id: playlist.id }
})
} else {
this.$router.push({ name: 'playlist', params: { id: playlist.id } })
this.$router.push({
name: 'playlist',
params: { id: playlist.id }
})
}
},

View File

@@ -90,7 +90,7 @@ export default {
open_playlist() {
this.$emit('close')
this.$router.push({
name: 'playlist-tracks',
name: 'playlist',
params: { id: this.playlist.id }
})
}