From d0fbd685231411acd0adccfb3232bb6e6a201e6e Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Mon, 10 Jul 2023 20:43:10 +0200 Subject: [PATCH] [web] Use named route for music albums Switching to named routes in order to reduce future maintenance. --- web-src/src/components/ListAlbums.vue | 2 +- web-src/src/components/ModalDialogAlbum.vue | 5 +++- .../src/components/ModalDialogQueueItem.vue | 7 ++++-- web-src/src/components/ModalDialogTrack.vue | 7 ++++-- web-src/src/components/NavbarTop.vue | 2 +- web-src/src/pages/PageAlbum.vue | 4 +-- web-src/src/router/index.js | 25 +++++++++---------- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/web-src/src/components/ListAlbums.vue b/web-src/src/components/ListAlbums.vue index f8dd5f3f..58cdb3e2 100644 --- a/web-src/src/components/ListAlbums.vue +++ b/web-src/src/components/ListAlbums.vue @@ -112,7 +112,7 @@ export default { params: { id: album.id } }) } else { - this.$router.push({ path: '/music/albums/' + album.id }) + this.$router.push({ name: 'music-album', params: { id: album.id } }) } }, diff --git a/web-src/src/components/ModalDialogAlbum.vue b/web-src/src/components/ModalDialogAlbum.vue index 0546743a..aa7d2d91 100644 --- a/web-src/src/components/ModalDialogAlbum.vue +++ b/web-src/src/components/ModalDialogAlbum.vue @@ -165,7 +165,10 @@ export default { params: { id: this.album.id } }) } else { - this.$router.push({ path: '/music/albums/' + this.album.id }) + this.$router.push({ + name: 'music-album', + params: { id: this.album.id } + }) } }, diff --git a/web-src/src/components/ModalDialogQueueItem.vue b/web-src/src/components/ModalDialogQueueItem.vue index 32f3b938..d9d6f587 100644 --- a/web-src/src/components/ModalDialogQueueItem.vue +++ b/web-src/src/components/ModalDialogQueueItem.vue @@ -166,8 +166,8 @@