Merge branch '1289-channel-entry-covers' into 'develop'

Add prop for default cover

Closes #1289

See merge request funkwhale/funkwhale!1253
environments/review-docs-devel-1399dq/deployments/6607
Ciarán Ainsworth 2020-12-04 09:21:18 +01:00
commit 6ad4ad2b5c
4 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -0,0 +1 @@
Changed default behaviour of channel entries to use channel artwork if no entry artwork available (#1289)

Wyświetl plik

@ -5,7 +5,7 @@
<div v-if="isLoading" class="ui inverted active dimmer">
<div class="ui loader"></div>
</div>
<channel-entry-card v-for="entry in objects" :entry="entry" :key="entry.id" />
<channel-entry-card v-for="entry in objects" :default-cover="defaultCover" :entry="entry" :key="entry.id" />
<template v-if="count > limit">
<div class="ui hidden divider"></div>
<div class = "ui center aligned basic segment">
@ -38,6 +38,7 @@ export default {
props: {
filters: {type: Object, required: true},
limit: {type: Number, default: 10},
defaultCover: {type: Object},
},
components: {
ChannelEntryCard,

Wyświetl plik

@ -9,10 +9,11 @@
class="channel-image image"
v-if="cover && cover.urls.original"
v-lazy="$store.getters['instance/absoluteUrl'](cover.urls.medium_square_crop)">
<span
<img
@click="$router.push({name: 'library.tracks.detail', params: {id: entry.id}})"
class="channel-image image"
v-else-if="entry.artist.content_category === 'podcast'">#{{ entry.position }}</span>
v-else-if="entry.artist.content_category === 'podcast' && defaultCover != undefined"
v-lazy="$store.getters['instance/absoluteUrl'](defaultCover.urls.medium_square_crop)">
<img
@click="$router.push({name: 'library.tracks.detail', params: {id: entry.id}})"
alt=""
@ -53,7 +54,7 @@ import { mapGetters } from "vuex"
export default {
props: ['entry'],
props: ['entry', 'defaultCover'],
components: {
PlayButton,
TrackFavoriteIcon,

Wyświetl plik

@ -49,7 +49,7 @@
:can-update="false"></rendered-description>
<div class="ui hidden divider"></div>
</div>
<channel-entries :key="String(episodesKey) + 'entries'" :limit='25' :filters="{channel: object.uuid, ordering: '-creation_date', page_size: '25'}">
<channel-entries :key="String(episodesKey) + 'entries'" :default-cover='object.artist.cover' :limit='25' :filters="{channel: object.uuid, ordering: '-creation_date', page_size: '25'}">
<h2 class="ui header">
<translate key="1" v-if="isPodcast" translate-context="Content/Channel/Paragraph">Latest episodes</translate>
<translate key="2" v-else translate-context="Content/Channel/Paragraph">Latest tracks</translate>