mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 00:05:03 -05:00
[web] Streamline method names
This commit is contained in:
parent
3ceb76b016
commit
0086dde94b
@ -7,12 +7,8 @@
|
||||
v-text="album.index"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="media is-align-items-center"
|
||||
@click="open_album(album.item)"
|
||||
>
|
||||
<div v-if="is_visible_artwork" class="media-left">
|
||||
<div v-else class="media is-align-items-center" @click="open(album.item)">
|
||||
<div v-if="show_artwork" class="media-left">
|
||||
<cover-artwork
|
||||
:artwork_url="album.item.artwork_url"
|
||||
:artist="album.item.artist"
|
||||
@ -93,20 +89,19 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
is_visible_artwork() {
|
||||
media_kind_resolved() {
|
||||
return this.media_kind || this.selected_album.media_kind
|
||||
},
|
||||
show_artwork() {
|
||||
return this.$store.getters.settings_option(
|
||||
'webinterface',
|
||||
'show_cover_artwork_in_album_lists'
|
||||
).value
|
||||
},
|
||||
|
||||
media_kind_resolved() {
|
||||
return this.media_kind || this.selected_album.media_kind
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
open_album(album) {
|
||||
open(album) {
|
||||
this.selected_album = album
|
||||
if (this.media_kind_resolved === 'podcast') {
|
||||
this.$router.push({ name: 'podcast', params: { id: album.id } })
|
||||
@ -119,12 +114,10 @@ export default {
|
||||
this.$router.push({ name: 'music-album', params: { id: album.id } })
|
||||
}
|
||||
},
|
||||
|
||||
open_dialog(album) {
|
||||
this.selected_album = album
|
||||
this.show_details_modal = true
|
||||
},
|
||||
|
||||
open_remove_podcast_dialog() {
|
||||
webapi
|
||||
.library_album_tracks(this.selected_album.id, { limit: 1 })
|
||||
@ -138,11 +131,9 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
play_count_changed() {
|
||||
this.$emit('play-count-changed')
|
||||
},
|
||||
|
||||
remove_podcast() {
|
||||
this.show_remove_podcast_modal = false
|
||||
webapi
|
||||
|
@ -12,11 +12,7 @@
|
||||
class="fd-has-shadow fd-cover fd-cover-normal-image mb-5"
|
||||
/>
|
||||
<p class="title is-4">
|
||||
<a
|
||||
class="has-text-link"
|
||||
@click="open_album"
|
||||
v-text="album.name"
|
||||
/>
|
||||
<a class="has-text-link" @click="open" v-text="album.name" />
|
||||
</p>
|
||||
<div v-if="media_kind_resolved === 'podcast'" class="buttons">
|
||||
<a
|
||||
@ -146,7 +142,7 @@ export default {
|
||||
this.$emit('close')
|
||||
})
|
||||
},
|
||||
open_album() {
|
||||
open() {
|
||||
this.$emit('close')
|
||||
if (this.media_kind_resolved === 'podcast') {
|
||||
this.$router.push({ name: 'podcast', params: { id: this.album.id } })
|
||||
|
@ -14,11 +14,7 @@
|
||||
@error="artwork_error"
|
||||
/>
|
||||
<p class="title is-4">
|
||||
<a
|
||||
class="has-text-link"
|
||||
@click="open_album"
|
||||
v-text="album.name"
|
||||
/>
|
||||
<a class="has-text-link" @click="open" v-text="album.name" />
|
||||
</p>
|
||||
<div class="content is-small">
|
||||
<p>
|
||||
@ -108,7 +104,7 @@ export default {
|
||||
artwork_url(album) {
|
||||
return album.images?.[0]?.url || ''
|
||||
},
|
||||
open_album() {
|
||||
open() {
|
||||
this.$emit('close')
|
||||
this.$router.push({
|
||||
name: 'music-spotify-album',
|
||||
|
Loading…
Reference in New Issue
Block a user