will now show multiple chips if there are multiple artists

This commit is contained in:
booploops 2022-02-24 05:30:09 -08:00
parent ae9669c3f9
commit 6245f6e601
2 changed files with 13 additions and 9 deletions

View file

@ -45,8 +45,10 @@
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
{{getArtistName(data)}}
</div>
<artist-chip v-if="useArtistChip"
:item="data.relationships.artists.data[0]"></artist-chip>
<template v-if="useArtistChip">
<artist-chip v-for="artist in data.relationships.artists.data"
:item="artist"></artist-chip>
</template>
<div class="playlist-desc"
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
<div v-if="data.attributes.description.short" class="content"

View file

@ -53,8 +53,10 @@
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
{{getArtistName(data)}}
</div>
<artist-chip v-if="useArtistChip"
:item="data.relationships.artists.data[0]"></artist-chip>
<template v-if="useArtistChip">
<artist-chip v-for="artist in data.relationships.artists.data"
:item="artist"></artist-chip>
</template>
<div class="playlist-desc"
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
<div v-if="data.attributes.description.short" class="content"
@ -440,9 +442,9 @@
let self = this
let artistId = null
if(typeof this.data.relationships.artists != "undefined") {
if (typeof this.data.relationships.artists != "undefined") {
artistId = this.data.relationships.artists.data[0].id
if(this.data.relationships.artists.data[0].type == "library-artists") {
if (this.data.relationships.artists.data[0].type == "library-artists") {
artistId = this.data.relationships.artists.data[0].relationships.catalog.data[0].id
}
}
@ -496,15 +498,15 @@
}
}
if(artistId != null) {
if(app.followingArtist(artistId)){
if (artistId != null) {
if (app.followingArtist(artistId)) {
menuItems.items.follow.hidden = true
menuItems.items.unfollow.hidden = false
} else {
menuItems.items.follow.hidden = false
menuItems.items.unfollow.hidden = true
}
}else{
} else {
menuItems.items.follow.hidden = true
menuItems.items.unfollow.hidden = true
}