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"
|
v-for="item in items"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:is-item="item.isItem"
|
:is-item="item.isItem"
|
||||||
|
:image="image(item)"
|
||||||
:index="item.index"
|
:index="item.index"
|
||||||
:lines="[item.name, item.owner.display_name]"
|
:lines="[item.name, item.owner.display_name]"
|
||||||
@open="open(item)"
|
@open="open(item)"
|
||||||
@ -20,6 +21,7 @@
|
|||||||
import ListItem from '@/components/ListItem.vue'
|
import ListItem from '@/components/ListItem.vue'
|
||||||
import LoaderListItem from '@/components/LoaderListItem.vue'
|
import LoaderListItem from '@/components/LoaderListItem.vue'
|
||||||
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
|
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
|
||||||
|
import { useSettingsStore } from '@/stores/settings'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ListPlaylistsSpotify',
|
name: 'ListPlaylistsSpotify',
|
||||||
@ -28,12 +30,19 @@ export default {
|
|||||||
items: { required: true, type: Object },
|
items: { required: true, type: Object },
|
||||||
load: { default: null, type: Function }
|
load: { default: null, type: Function }
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return { settingsStore: useSettingsStore() }
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return { selectedItem: {}, showDetailsModal: false }
|
return { selectedItem: {}, showDetailsModal: false }
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
image(item) {
|
||||||
|
if (this.settingsStore.showCoverArtworkInAlbumLists) {
|
||||||
|
return { caption: item.name, url: item.images?.[0]?.url }
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
},
|
||||||
open(item) {
|
open(item) {
|
||||||
this.$router.push({ name: 'playlist-spotify', params: { id: item.id } })
|
this.$router.push({ name: 'playlist-spotify', params: { id: item.id } })
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user