Skip to content
Snippets Groups Projects
Commit 06402611 authored by Ciaran Ainsworth's avatar Ciaran Ainsworth
Browse files

Improved cover logic

parent 17fbd5b8
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
</div>
<podcast-table
v-if="isPodcast"
:default-cover="defaultCover"
:is-podcast="isPodcast"
:show-art="true"
:show-position="false"
......@@ -20,6 +21,7 @@
:paginate-by="limit"></podcast-table>
<track-table
v-else
:default-cover="defaultCover"
:is-podcast="isPodcast"
:show-art="true"
:show-position="false"
......
......@@ -18,18 +18,6 @@
alt=""
class="ui artist-track mini image"
v-if="
track.album && track.album.cover && track.album.cover.urls.original
"
v-lazy="
$store.getters['instance/absoluteUrl'](
track.album.cover.urls.medium_square_crop
)
"
/>
<img
alt=""
class="ui artist-track mini image"
v-else-if="
track.cover && track.cover.urls.original
"
v-lazy="
......@@ -42,11 +30,11 @@
alt=""
class="ui artist-track mini image"
v-else-if="
track.artist && track.artist.cover && track.album.cover.urls.original
defaultCover
"
v-lazy="
$store.getters['instance/absoluteUrl'](
track.cover.urls.medium_square_crop
defaultCover.cover.urls.medium_square_crop
)
"
/>
......@@ -58,7 +46,9 @@
/>
</div>
<div tabindex=0 class="content left floated column">
<p class="podcast-episode-title ellipsis">{{ track.title }}</p>
<a
class="podcast-episode-title ellipsis"
@click.prevent.exact="activateTrack(track, index)">{{ track.title }}</a>
<p class="podcast-episode-meta">
An episode description, with all its twists and turns!
This episode focuses on something I'm sure, but nobody really knows what it's focusing on.</p>
......@@ -84,8 +74,10 @@
import PlayIndicator from "@/components/audio/track/PlayIndicator";
import { mapActions, mapGetters } from "vuex";
import PlayButton from "@/components/audio/PlayButton";
import PlayOptions from "@/components/mixins/PlayOptions";
export default {
mixins: [PlayOptions],
props: {
tracks: Array,
showAlbum: { type: Boolean, required: false, default: true },
......@@ -99,6 +91,7 @@ export default {
showDuration: { type: Boolean, required: false, default: true },
index: { type: Number, required: true },
track: { type: Object, required: true },
defaultCover: { type: Object, required: false },
},
data() {
......
......@@ -13,6 +13,7 @@
<!-- For each item, build a row -->
<podcast-row
v-for="(track, index) in tracks"
:default-cover="defaultCover"
:track="track"
:key="track.id"
:index="index"
......@@ -42,11 +43,11 @@
<!-- For each item, build a row -->
<track-mobile-row
v-for="(track, index) in allTracks"
v-for="(track, index) in tracks"
:track="track"
:key="track.id"
:index="index"
:tracks="allTracks"
:tracks="tracks"
:show-position="showPosition"
:show-art="showArt"
:show-duration="showDuration"
......@@ -99,6 +100,7 @@ export default {
page: {type: Number, required: false, default: 1},
paginateBy: {type: Number, required: false, default: 25},
isPodcast: {type: Boolean, required: true},
defaultCover: {type: Object, required: false},
},
data() {
......
......@@ -165,7 +165,7 @@ import PlayIndicator from "@/components/audio/track/PlayIndicator";
import { mapActions, mapGetters } from "vuex";
import TrackFavoriteIcon from "@/components/favorites/TrackFavoriteIcon";
import PlayButton from "@/components/audio/PlayButton";
import PlayOptions from "@/components/mixins/PlayOptions"
import PlayOptions from "@/components/mixins/PlayOptions";
export default {
mixins: [PlayOptions],
......
<script>
import axios from 'axios'
export default {
computed: {
playable () {
......
......@@ -238,6 +238,11 @@
.podcast-episode-title {
font-weight: bold;
font-size: medium;
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
}
}
\ No newline at end of file
<template>
<section>
<channel-entries :limit="25" :filters="{channel: object.uuid, ordering: 'creation_date'}">
<channel-entries :default-cover="object.artist.cover" :is-podcast="object.artist.content_category === 'podcast'" :limit="25" :filters="{channel: object.uuid, ordering: 'creation_date'}">
</channel-entries>
</section>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment