fix(front): albums on artist cards
This commit is contained in:
parent
e770dc13df
commit
b71ba7a33d
|
@ -21,6 +21,9 @@ const props = defineProps<Props>()
|
||||||
|
|
||||||
const { artist } = props
|
const { artist } = props
|
||||||
|
|
||||||
|
if ('albums' in artist && Array.isArray(artist.albums)) {
|
||||||
|
albums.value = artist.albums
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -35,7 +38,7 @@ const { artist } = props
|
||||||
<template #topright>
|
<template #topright>
|
||||||
<PlayButton
|
<PlayButton
|
||||||
icon-only
|
icon-only
|
||||||
:is-playable="Boolean(albums.find(album => album.is_playable))"
|
:is-playable="true"
|
||||||
:artist="artist"
|
:artist="artist"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -61,6 +64,13 @@ const { artist } = props
|
||||||
<span v-else-if="'tracks_count' in artist">
|
<span v-else-if="'tracks_count' in artist">
|
||||||
{{ t('components.audio.artist.Card.meta.episodes', artist.tracks_count) }}
|
{{ t('components.audio.artist.Card.meta.episodes', artist.tracks_count) }}
|
||||||
</span>
|
</span>
|
||||||
|
<i
|
||||||
|
v-if="albums"
|
||||||
|
class="bi bi-dot"
|
||||||
|
/>
|
||||||
|
<span v-if="albums">
|
||||||
|
{{ t('components.audio.artist.Card.meta.albums', albums.length) }}
|
||||||
|
</span>
|
||||||
<Spacer style="flex-grow: 1" />
|
<Spacer style="flex-grow: 1" />
|
||||||
<PlayButton
|
<PlayButton
|
||||||
:dropdown-only="true"
|
:dropdown-only="true"
|
||||||
|
|
|
@ -596,7 +596,8 @@
|
||||||
"Card": {
|
"Card": {
|
||||||
"meta": {
|
"meta": {
|
||||||
"episodes": "No episodes | {n} episode | {n} episodes",
|
"episodes": "No episodes | {n} episode | {n} episodes",
|
||||||
"tracks": "No tracks | {n} track | {n} tracks"
|
"tracks": "No tracks | {n} track | {n} tracks",
|
||||||
|
"albums": "No albums | {n} album | {n} albums"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Widget": {
|
"Widget": {
|
||||||
|
|
|
@ -595,7 +595,8 @@
|
||||||
"Card": {
|
"Card": {
|
||||||
"meta": {
|
"meta": {
|
||||||
"episodes": "No episodes | {n} episode | {n} episodes",
|
"episodes": "No episodes | {n} episode | {n} episodes",
|
||||||
"tracks": "No tracks | {n} track | {n} tracks"
|
"tracks": "No tracks | {n} track | {n} tracks",
|
||||||
|
"albums": "No albums | {n} album | {n} albums"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Widget": {
|
"Widget": {
|
||||||
|
|
Loading…
Reference in New Issue