Skip to content
Snippets Groups Projects
Commit 6ad4ad2b authored by Ciarán Ainsworth's avatar Ciarán Ainsworth
Browse files

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

Add prop for default cover

Closes #1289

See merge request funkwhale/funkwhale!1253
parents 8fd0f899 804f9a7d
Branches
No related tags found
No related merge requests found
Changed default behaviour of channel entries to use channel artwork if no entry artwork available (#1289)
\ No newline at end of file
......@@ -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,
......
......@@ -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,
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment