will now show multiple chips if there are multiple artists
This commit is contained in:
parent
ae9669c3f9
commit
6245f6e601
2 changed files with 13 additions and 9 deletions
|
@ -45,8 +45,10 @@
|
||||||
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
||||||
{{getArtistName(data)}}
|
{{getArtistName(data)}}
|
||||||
</div>
|
</div>
|
||||||
<artist-chip v-if="useArtistChip"
|
<template v-if="useArtistChip">
|
||||||
:item="data.relationships.artists.data[0]"></artist-chip>
|
<artist-chip v-for="artist in data.relationships.artists.data"
|
||||||
|
:item="artist"></artist-chip>
|
||||||
|
</template>
|
||||||
<div class="playlist-desc"
|
<div class="playlist-desc"
|
||||||
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
|
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
|
||||||
<div v-if="data.attributes.description.short" class="content"
|
<div v-if="data.attributes.description.short" class="content"
|
||||||
|
|
|
@ -53,8 +53,10 @@
|
||||||
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
||||||
{{getArtistName(data)}}
|
{{getArtistName(data)}}
|
||||||
</div>
|
</div>
|
||||||
<artist-chip v-if="useArtistChip"
|
<template v-if="useArtistChip">
|
||||||
:item="data.relationships.artists.data[0]"></artist-chip>
|
<artist-chip v-for="artist in data.relationships.artists.data"
|
||||||
|
:item="artist"></artist-chip>
|
||||||
|
</template>
|
||||||
<div class="playlist-desc"
|
<div class="playlist-desc"
|
||||||
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
|
v-if="data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)">
|
||||||
<div v-if="data.attributes.description.short" class="content"
|
<div v-if="data.attributes.description.short" class="content"
|
||||||
|
@ -440,9 +442,9 @@
|
||||||
let self = this
|
let self = this
|
||||||
let artistId = null
|
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
|
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
|
artistId = this.data.relationships.artists.data[0].relationships.catalog.data[0].id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,15 +498,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(artistId != null) {
|
if (artistId != null) {
|
||||||
if(app.followingArtist(artistId)){
|
if (app.followingArtist(artistId)) {
|
||||||
menuItems.items.follow.hidden = true
|
menuItems.items.follow.hidden = true
|
||||||
menuItems.items.unfollow.hidden = false
|
menuItems.items.unfollow.hidden = false
|
||||||
} else {
|
} else {
|
||||||
menuItems.items.follow.hidden = false
|
menuItems.items.follow.hidden = false
|
||||||
menuItems.items.unfollow.hidden = true
|
menuItems.items.unfollow.hidden = true
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
menuItems.items.follow.hidden = true
|
menuItems.items.follow.hidden = true
|
||||||
menuItems.items.unfollow.hidden = true
|
menuItems.items.unfollow.hidden = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue