[web] Use named route for audiobook albums and artists

Switching to named routes in order to reduce future maintenance.
This commit is contained in:
Alain Nussbaumer
2023-07-10 20:08:35 +02:00
parent 63586db7b6
commit d4a484f20e
9 changed files with 50 additions and 36 deletions

View File

@@ -99,7 +99,10 @@ export default {
methods: {
open_artist() {
this.show_details_modal = false
this.$router.push({ path: '/audiobooks/artists/' + this.album.artist_id })
this.$router.push({
name: 'audiobooks-artist',
params: { id: this.album.artist_id }
})
},
play() {

View File

@@ -40,16 +40,16 @@
<script>
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import { GroupByList } from '../lib/GroupByList'
import ListAlbums from '@/components/ListAlbums.vue'
import ModalDialogArtist from '@/components/ModalDialogArtist.vue'
import webapi from '@/webapi'
import { GroupByList } from '../lib/GroupByList'
const dataObject = {
load(to) {
return Promise.all([
webapi.library_artist(to.params.artist_id),
webapi.library_artist_albums(to.params.artist_id)
webapi.library_artist(to.params.id),
webapi.library_artist_albums(to.params.id)
])
},