mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-16 04:11:55 -04:00
[web] Rename pages for more coherence
This commit is contained in:
parent
59050c1018
commit
04c119a3fd
@ -59,13 +59,11 @@ export default {
|
||||
const mediaKind = this.mediaKind || this.selectedItem.media_kind
|
||||
if (mediaKind === 'podcast') {
|
||||
this.$router.push({ name: 'podcast', params: { id: item.id } })
|
||||
} else if (mediaKind === 'audiobook') {
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-album',
|
||||
name: `${mediaKind}-album`,
|
||||
params: { id: item.id }
|
||||
})
|
||||
} else {
|
||||
this.$router.push({ name: 'music-album', params: { id: item.id } })
|
||||
}
|
||||
},
|
||||
openDetails(item) {
|
||||
|
@ -33,9 +33,10 @@ export default {
|
||||
methods: {
|
||||
open(item) {
|
||||
this.selectedItem = item
|
||||
const route =
|
||||
item.media_kind === 'audiobook' ? 'audiobooks-artist' : 'music-artist'
|
||||
this.$router.push({ name: route, params: { id: item.id } })
|
||||
this.$router.push({
|
||||
name: `${item.media_kind}-artist`,
|
||||
params: { id: item.id }
|
||||
})
|
||||
},
|
||||
openDetails(item) {
|
||||
this.selectedItem = item
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
]
|
||||
},
|
||||
buttons() {
|
||||
if (this.mediaKindResolved === 'podcast') {
|
||||
if (this.computedMediaKind === 'podcast') {
|
||||
if (this.item.data_kind === 'url') {
|
||||
return [
|
||||
{ handler: this.markAsPlayed, key: 'actions.mark-as-played' },
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
}
|
||||
return []
|
||||
},
|
||||
mediaKindResolved() {
|
||||
computedMediaKind() {
|
||||
return this.mediaKind || this.item.media_kind
|
||||
},
|
||||
playable() {
|
||||
@ -122,17 +122,10 @@ export default {
|
||||
},
|
||||
openArtist() {
|
||||
this.$emit('close')
|
||||
if (this.mediaKindResolved === 'audiobook') {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-artist',
|
||||
name: `${this.computedMediaKind}-artist`,
|
||||
params: { id: this.item.artist_id }
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'music-artist',
|
||||
params: { id: this.item.artist_id }
|
||||
})
|
||||
}
|
||||
},
|
||||
openRemovePodcastDialog() {
|
||||
this.showRemovePodcastModal = true
|
||||
|
@ -115,14 +115,9 @@ export default {
|
||||
name: 'podcast',
|
||||
params: { id: this.item.album_id }
|
||||
})
|
||||
} else if (this.item.media_kind === 'audiobook') {
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-album',
|
||||
params: { id: this.item.album_id }
|
||||
})
|
||||
} else if (this.item.media_kind === 'music') {
|
||||
this.$router.push({
|
||||
name: 'music-album',
|
||||
name: `${this.item.media_kind}-album`,
|
||||
params: { id: this.item.album_id }
|
||||
})
|
||||
}
|
||||
@ -144,7 +139,7 @@ export default {
|
||||
})
|
||||
} else if (this.item.media_kind === 'audiobook') {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-artist',
|
||||
name: 'audiobook-artist',
|
||||
params: { id: this.item.album_artist_id }
|
||||
})
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ export default {
|
||||
buttons() {
|
||||
if (this.item.media_kind !== 'podcast') {
|
||||
return []
|
||||
} else if (this.item.play_count > 0) {
|
||||
return [{ handler: this.markAsNew, key: 'actions.mark-as-new' }]
|
||||
}
|
||||
return this.item.play_count > 0
|
||||
? [{ handler: this.markAsNew, key: 'actions.mark-as-new' }]
|
||||
: [{ handler: this.markAsPlayed, key: 'actions.mark-as-played' }]
|
||||
return [{ handler: this.markAsPlayed, key: 'actions.mark-as-played' }]
|
||||
},
|
||||
playable() {
|
||||
return {
|
||||
@ -114,7 +114,7 @@ export default {
|
||||
})
|
||||
} else if (this.item.media_kind === 'audiobook') {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-album',
|
||||
name: 'audiobook-album',
|
||||
params: { id: this.item.album_id }
|
||||
})
|
||||
} else if (this.item.media_kind === 'music') {
|
||||
@ -136,7 +136,7 @@ export default {
|
||||
})
|
||||
} else if (this.item.media_kind === 'audiobook') {
|
||||
this.$router.push({
|
||||
name: 'audiobooks-artist',
|
||||
name: 'audiobook-artist',
|
||||
params: { id: this.item.album_artist_id }
|
||||
})
|
||||
}
|
||||
|
@ -14,17 +14,17 @@ export default {
|
||||
{
|
||||
icon: 'account-music',
|
||||
key: 'page.audiobooks.tabs.authors',
|
||||
to: { name: 'audiobooks-artists' }
|
||||
to: { name: 'audiobook-artists' }
|
||||
},
|
||||
{
|
||||
icon: 'album',
|
||||
key: 'page.audiobooks.tabs.audiobooks',
|
||||
to: { name: 'audiobooks-albums' }
|
||||
to: { name: 'audiobook-albums' }
|
||||
},
|
||||
{
|
||||
icon: 'speaker',
|
||||
key: 'page.audiobooks.tabs.genres',
|
||||
to: { name: 'audiobooks-genres' }
|
||||
to: { name: 'audiobook-genres' }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import library from '@/api/library'
|
||||
import queue from '@/api/queue'
|
||||
|
||||
export default {
|
||||
name: 'PageAudiobooksAlbum',
|
||||
name: 'PageAudiobookAlbum',
|
||||
components: {
|
||||
ContentWithHero,
|
||||
ControlImage,
|
||||
@ -78,7 +78,7 @@ export default {
|
||||
openArtist() {
|
||||
this.showDetailsModal = false
|
||||
this.$router.push({
|
||||
name: 'audiobooks-artist',
|
||||
name: 'audiobook-artist',
|
||||
params: { id: this.album.artist_id }
|
||||
})
|
||||
},
|
@ -23,7 +23,7 @@ import TabsAudiobooks from '@/components/TabsAudiobooks.vue'
|
||||
import library from '@/api/library'
|
||||
|
||||
export default {
|
||||
name: 'PageAudiobooksAlbums',
|
||||
name: 'PageAudiobookAlbums',
|
||||
components: {
|
||||
ContentWithHeading,
|
||||
ListIndexButtons,
|
@ -33,7 +33,7 @@ import library from '@/api/library'
|
||||
import queue from '@/api/queue'
|
||||
|
||||
export default {
|
||||
name: 'PageAudiobooksArtist',
|
||||
name: 'PageAudiobookArtist',
|
||||
components: {
|
||||
ContentWithHeading,
|
||||
ControlButton,
|
@ -23,7 +23,7 @@ import TabsAudiobooks from '@/components/TabsAudiobooks.vue'
|
||||
import library from '@/api/library'
|
||||
|
||||
export default {
|
||||
name: 'PageAudiobooksArtists',
|
||||
name: 'PageAudiobookArtists',
|
||||
components: {
|
||||
ContentWithHeading,
|
||||
ListIndexButtons,
|
@ -7,11 +7,11 @@ import PageArtist from '@/pages/PageArtist.vue'
|
||||
import PageArtistSpotify from '@/pages/PageArtistSpotify.vue'
|
||||
import PageArtistTracks from '@/pages/PageArtistTracks.vue'
|
||||
import PageArtists from '@/pages/PageArtists.vue'
|
||||
import PageAudiobooksAlbum from '@/pages/PageAudiobooksAlbum.vue'
|
||||
import PageAudiobooksAlbums from '@/pages/PageAudiobooksAlbums.vue'
|
||||
import PageAudiobooksArtist from '@/pages/PageAudiobooksArtist.vue'
|
||||
import PageAudiobooksArtists from '@/pages/PageAudiobooksArtists.vue'
|
||||
import PageAudiobooksGenres from '@/pages/PageAudiobooksGenres.vue'
|
||||
import PageAudiobookAlbum from '@/pages/PageAudiobookAlbum.vue'
|
||||
import PageAudiobookAlbums from '@/pages/PageAudiobookAlbums.vue'
|
||||
import PageAudiobookArtist from '@/pages/PageAudiobookArtist.vue'
|
||||
import PageAudiobookArtists from '@/pages/PageAudiobookArtists.vue'
|
||||
import PageAudiobookGenres from '@/pages/PageAudiobookGenres.vue'
|
||||
import PageComposerAlbums from '@/pages/PageComposerAlbums.vue'
|
||||
import PageComposerTracks from '@/pages/PageComposerTracks.vue'
|
||||
import PageComposers from '@/pages/PageComposers.vue'
|
||||
@ -79,34 +79,34 @@ export const router = createRouter({
|
||||
path: '/music/artists/:id/tracks'
|
||||
},
|
||||
{
|
||||
component: PageAudiobooksAlbum,
|
||||
name: 'audiobooks-album',
|
||||
path: '/audiobooks/albums/:id'
|
||||
component: PageAudiobookAlbum,
|
||||
name: 'audiobook-album',
|
||||
path: '/audiobook/albums/:id'
|
||||
},
|
||||
{
|
||||
component: PageAudiobooksAlbums,
|
||||
name: 'audiobooks-albums',
|
||||
path: '/audiobooks/albums'
|
||||
component: PageAudiobookAlbums,
|
||||
name: 'audiobook-albums',
|
||||
path: '/audiobook/albums'
|
||||
},
|
||||
{
|
||||
component: PageAudiobooksArtist,
|
||||
name: 'audiobooks-artist',
|
||||
path: '/audiobooks/artists/:id'
|
||||
component: PageAudiobookArtist,
|
||||
name: 'audiobook-artist',
|
||||
path: '/audiobook/artists/:id'
|
||||
},
|
||||
{
|
||||
component: PageAudiobooksArtists,
|
||||
name: 'audiobooks-artists',
|
||||
path: '/audiobooks/artists'
|
||||
component: PageAudiobookArtists,
|
||||
name: 'audiobook-artists',
|
||||
path: '/audiobook/artists'
|
||||
},
|
||||
{
|
||||
component: PageAudiobooksGenres,
|
||||
name: 'audiobooks-genres',
|
||||
path: '/audiobooks/genres'
|
||||
component: PageAudiobookGenres,
|
||||
name: 'audiobook-genres',
|
||||
path: '/audiobook/genres'
|
||||
},
|
||||
{
|
||||
name: 'audiobooks',
|
||||
path: '/audiobooks',
|
||||
redirect: { name: 'audiobooks-artists' }
|
||||
redirect: { name: 'audiobook-artists' }
|
||||
},
|
||||
{
|
||||
name: 'music',
|
||||
|
Loading…
x
Reference in New Issue
Block a user