mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 03:27:46 -05:00
[web] Rename pages for more coherence
This commit is contained in:
@@ -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',
|
||||
params: { id: this.item.artist_id }
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'music-artist',
|
||||
params: { id: this.item.artist_id }
|
||||
})
|
||||
}
|
||||
this.$router.push({
|
||||
name: `${this.computedMediaKind}-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' }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user