mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-30 00:05:05 -04:00
[web] Show cover of Spotify playlists
This commit is contained in:
parent
978a9b6a96
commit
2d5dd3d7fd
@ -3,6 +3,7 @@
|
||||
v-for="item in items"
|
||||
:key="item.id"
|
||||
:is-item="item.isItem"
|
||||
:image="image(item)"
|
||||
:index="item.index"
|
||||
:lines="[item.name, item.owner.display_name]"
|
||||
@open="open(item)"
|
||||
@ -20,6 +21,7 @@
|
||||
import ListItem from '@/components/ListItem.vue'
|
||||
import LoaderListItem from '@/components/LoaderListItem.vue'
|
||||
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
|
||||
import { useSettingsStore } from '@/stores/settings'
|
||||
|
||||
export default {
|
||||
name: 'ListPlaylistsSpotify',
|
||||
@ -28,12 +30,19 @@ export default {
|
||||
items: { required: true, type: Object },
|
||||
load: { default: null, type: Function }
|
||||
},
|
||||
|
||||
setup() {
|
||||
return { settingsStore: useSettingsStore() }
|
||||
},
|
||||
data() {
|
||||
return { selectedItem: {}, showDetailsModal: false }
|
||||
},
|
||||
|
||||
methods: {
|
||||
image(item) {
|
||||
if (this.settingsStore.showCoverArtworkInAlbumLists) {
|
||||
return { caption: item.name, url: item.images?.[0]?.url }
|
||||
}
|
||||
return null
|
||||
},
|
||||
open(item) {
|
||||
this.$router.push({ name: 'playlist-spotify', params: { id: item.id } })
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user