From 44d488467e2483bcea626294a4bdf2cf48d07d0f Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Mon, 10 Jul 2023 13:09:27 +0200 Subject: [PATCH] [web] Use named route for the podcasts page Switching to named routes in order to reduce future maintenance. --- web-src/src/components/NavbarTop.vue | 4 ++-- web-src/src/pages/PagePodcast.vue | 2 +- web-src/src/router/index.js | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web-src/src/components/NavbarTop.vue b/web-src/src/components/NavbarTop.vue index 9cf519db..7fc18d02 100644 --- a/web-src/src/components/NavbarTop.vue +++ b/web-src/src/components/NavbarTop.vue @@ -15,7 +15,7 @@ - + - + diff --git a/web-src/src/pages/PagePodcast.vue b/web-src/src/pages/PagePodcast.vue index 4d90803f..cb8fb452 100644 --- a/web-src/src/pages/PagePodcast.vue +++ b/web-src/src/pages/PagePodcast.vue @@ -139,7 +139,7 @@ export default { webapi .library_playlist_delete(this.rss_playlist_to_remove.id) .then(() => { - this.$router.replace({ path: '/podcasts' }) + this.$router.replace({ name: 'podcasts' }) }) }, diff --git a/web-src/src/router/index.js b/web-src/src/router/index.js index 8731398d..466fb6be 100644 --- a/web-src/src/router/index.js +++ b/web-src/src/router/index.js @@ -3,8 +3,10 @@ import { createRouter, createWebHashHistory } from 'vue-router' import PageAbout from '@/pages/PageAbout.vue' import PageAudiobooksAlbum from '@/pages/PageAudiobooksAlbum.vue' import PageAudiobooksAlbums from '@/pages/PageAudiobooksAlbums.vue' -import PageQueue from '@/pages/PageQueue.vue' +import PagePodcast from '@/pages/PagePodcast.vue' +import PagePodcasts from '@/pages/PagePodcasts.vue' import PageNowPlaying from '@/pages/PageNowPlaying.vue' +import PageQueue from '@/pages/PageQueue.vue' import PageBrowse from '@/pages/PageBrowse.vue' import PageBrowseRecentlyAdded from '@/pages/PageBrowseRecentlyAdded.vue' import PageBrowseRecentlyPlayed from '@/pages/PageBrowseRecentlyPlayed.vue' @@ -19,8 +21,6 @@ import PageArtistTracks from '@/pages/PageArtistTracks.vue' import PageComposers from '@/pages/PageComposers.vue' import PageComposer from '@/pages/PageComposer.vue' import PageComposerTracks from '@/pages/PageComposerTracks.vue' -import PagePodcast from '@/pages/PagePodcast.vue' -import PagePodcasts from '@/pages/PagePodcasts.vue' import PageAudiobooksArtists from '@/pages/PageAudiobooksArtists.vue' import PageAudiobooksArtist from '@/pages/PageAudiobooksArtist.vue' import PagePlaylists from '@/pages/PagePlaylists.vue' @@ -155,10 +155,10 @@ export const router = createRouter({ path: '/podcast/:id' }, { - path: '/podcasts', - name: 'Podcasts', component: PagePodcasts, - meta: { show_progress: true } + meta: { show_progress: true }, + name: 'podcasts', + path: '/podcasts', }, { path: '/audiobooks',