improvements to artist chip
This commit is contained in:
parent
a47fa00093
commit
865fb9979e
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
||||||
<script type="text/x-template" id="artist-chip">
|
<script type="text/x-template" id="artist-chip">
|
||||||
<div class="artist-chip" @click.self="route" tabindex="0">
|
<div class="artist-chip" @click.self="route" tabindex="0">
|
||||||
<div class="artist-chip__image">
|
<div class="artist-chip__image" v-if="image" :style="{backgroundColor: '#' + (artist.attributes.artwork?.bgColor ?? '000')}">
|
||||||
<mediaitem-artwork v-if="artist.id != null" :url="artist.attributes.artwork.url" :size="32"></mediaitem-artwork>
|
<mediaitem-artwork v-if="artist.id != null" :url="artist.attributes.artwork.url" :size="80"></mediaitem-artwork>
|
||||||
|
</div>
|
||||||
|
<div class="artist-chip__image" v-else>
|
||||||
</div>
|
</div>
|
||||||
<div class="artist-chip__name">
|
<div class="artist-chip__name">
|
||||||
<span>{{ item.attributes.name }}</span>
|
<span>{{ item.attributes.name }}</span>
|
||||||
|
@ -21,6 +23,7 @@
|
||||||
},
|
},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
image: false,
|
||||||
artist: {
|
artist: {
|
||||||
id: null
|
id: null
|
||||||
}
|
}
|
||||||
|
@ -34,6 +37,7 @@
|
||||||
}
|
}
|
||||||
app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artistId}`).then(response => {
|
app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artistId}`).then(response => {
|
||||||
this.artist = response.data.data[0];
|
this.artist = response.data.data[0];
|
||||||
|
this.image = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue