[web] Use named route for radio page

Switching to named routes in order to reduce future maintenance.
This commit is contained in:
Alain Nussbaumer 2023-07-10 19:25:17 +02:00
parent c8488f999b
commit 63586db7b6
2 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@
>
<mdicon class="icon" name="book-open-variant" size="16" />
</navbar-item-link>
<navbar-item-link v-if="is_visible_radio" :to="{ path: '/radio' }">
<navbar-item-link v-if="is_visible_radio" :to="{ name: 'radio' }">
<mdicon class="icon" name="radio" size="16" />
</navbar-item-link>
<navbar-item-link v-if="is_visible_files" :to="{ name: 'files' }">
@ -88,7 +88,7 @@
<mdicon class="icon" name="book-open-variant" size="16" />
<b v-text="$t('navigation.audiobooks')" />
</navbar-item-link>
<navbar-item-link :to="{ path: '/radio' }">
<navbar-item-link :to="{ name: 'radio' }">
<mdicon class="icon" name="radio" size="16" />
<b v-text="$t('navigation.radio')" />
</navbar-item-link>

View File

@ -188,6 +188,12 @@ export const router = createRouter({
name: 'podcasts',
path: '/podcasts'
},
{
component: PageRadioStreams,
meta: { show_progress: true },
name: 'radio',
path: '/radio'
},
{
path: '/audiobooks',
redirect: '/audiobooks/artists'
@ -210,12 +216,6 @@ export const router = createRouter({
component: PageAudiobooksAlbums,
meta: { show_progress: true, has_tabs: true, has_index: true }
},
{
path: '/radio',
name: 'Radio',
component: PageRadioStreams,
meta: { show_progress: true }
},
{
component: PageQueue,
name: 'queue',