Showing poster in release album. Filtering empty items from album component.

This commit is contained in:
DebaucheryLibrarian 2021-02-10 03:29:41 +01:00
parent 6e2527e5c5
commit b6b3def8fa
2 changed files with 7 additions and 5 deletions

View File

@ -45,10 +45,12 @@
<script>
function albumItems() {
return this.items.map(item => ({
...item,
title: item.comment || (item.credit && `© ${item.credit}`) || (item.entity && `© ${item.entity.name}`),
}));
return this.items
.filter(Boolean)
.map(item => ({
...item,
title: item.comment || (item.credit && `© ${item.credit}`) || (item.entity && `© ${item.entity.name}`),
}));
}
export default {

View File

@ -27,7 +27,7 @@
<Album
v-if="showAlbum"
:items="release.photos"
:items="[release.poster, ...release.photos]"
:title="release.title"
@close="$router.go(-1)"
/>