mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-15 08:45:02 -05:00
[web] Use named route for the "now playing" page
Switching to named routes in order to reduce future maintenance.
This commit is contained in:
parent
87ccdf7723
commit
f09647d754
@ -112,7 +112,7 @@
|
|||||||
</navbar-item-link>
|
</navbar-item-link>
|
||||||
<navbar-item-link
|
<navbar-item-link
|
||||||
v-if="!is_now_playing_page"
|
v-if="!is_now_playing_page"
|
||||||
:to="{ path: '/now-playing' }"
|
:to="{ name: 'now-playing' }"
|
||||||
exact
|
exact
|
||||||
class="navbar-item fd-is-text-clipped is-expanded is-clipped is-size-7"
|
class="navbar-item fd-is-text-clipped is-expanded is-clipped is-size-7"
|
||||||
>
|
>
|
||||||
@ -330,7 +330,7 @@ export default {
|
|||||||
return this.$store.getters.now_playing
|
return this.$store.getters.now_playing
|
||||||
},
|
},
|
||||||
is_now_playing_page() {
|
is_now_playing_page() {
|
||||||
return this.$route.path === '/now-playing'
|
return this.$route.name === 'now-playing'
|
||||||
},
|
},
|
||||||
outputs() {
|
outputs() {
|
||||||
return this.$store.state.outputs
|
return this.$store.state.outputs
|
||||||
|
@ -55,11 +55,6 @@ export const router = createRouter({
|
|||||||
name: 'audiobook',
|
name: 'audiobook',
|
||||||
path: '/audiobook/:id'
|
path: '/audiobook/:id'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/now-playing',
|
|
||||||
name: 'Now playing',
|
|
||||||
component: PageNowPlaying
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/music',
|
path: '/music',
|
||||||
redirect: '/music/browse'
|
redirect: '/music/browse'
|
||||||
@ -148,6 +143,11 @@ export const router = createRouter({
|
|||||||
component: PageComposerTracks,
|
component: PageComposerTracks,
|
||||||
meta: { show_progress: true, has_index: true }
|
meta: { show_progress: true, has_index: true }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: PageNowPlaying,
|
||||||
|
name: 'now-playing',
|
||||||
|
path: '/now-playing',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
component: PagePodcast,
|
component: PagePodcast,
|
||||||
meta: { show_progress: true },
|
meta: { show_progress: true },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user