[web] Fix an issue preventing the index button list to work in the genre pages

This commit is contained in:
Alain Nussbaumer 2023-07-25 19:12:12 +02:00
parent 294e640ac1
commit a484f89e0a
2 changed files with 6 additions and 8 deletions

View File

@ -96,14 +96,10 @@ export default {
return {
genre: {},
albums_list: new GroupByList(),
media_kind: this.$route.query.media_kind,
show_genre_details_modal: false
}
},
computed: {
media_kind() {
return this.$route.query.media_kind
}
},
methods: {
open_tracks() {
this.show_details_modal = false

View File

@ -94,6 +94,10 @@ export default {
})
},
beforeRouteUpdate(to, from, next) {
if (!this.tracks_list.isEmpty()) {
next()
return
}
const vm = this
dataObject.load(to).then((response) => {
dataObject.set(vm, response)
@ -118,6 +122,7 @@ export default {
})
}
],
media_kind: this.$route.query.media_kind,
show_genre_details_modal: false,
tracks_list: new GroupByList()
}
@ -127,9 +132,6 @@ export default {
expression() {
return `genre is "${this.genre.name}" and media_kind is ${this.media_kind}`
},
media_kind() {
return this.$route.query.media_kind
},
selected_groupby_option_id: {
get() {
return this.$store.state.genre_tracks_sort