Commit d0398fa6 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

add cover image to recording previews

parent c390a069
......@@ -2,7 +2,7 @@
<app-card :title="recording.title" :description="recording.description"
:link="{ to: { name: 'recording', params: { id: recording.id } } }" has-body-link>
<template v-slot:image>
<app-play-pause :tracks="tracks" :track-id="recording.id" :title="recording.title"/>
<app-play-pause :tracks="tracks" :track-id="recording.id" :title="recording.title" :image="coverImage"/>
</template>
<template v-slot:footer>
......@@ -26,6 +26,11 @@
recording: Object
},
computed: {
coverImage () {
return this.recording.cover_image
? this.dataSources.createImageUrl(this.recording.cover_image)
: null
},
productionDate () {
return new Date(this.recording.production_date)
},
......@@ -35,7 +40,8 @@
durationLabel () {
return secondsToDuration(this.duration)
}
}
},
inject: ['dataSources']
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment