Commit 30691fbe authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

add broadcast preview component

parent 3058f708
<template>
<app-card :title="broadcast.subtitle || series.name" :description="description" :image="coverImage">
<template v-slot:footer>
<div class="f-1 opaque-7 mt-1">
<app-time :date="new Date(broadcast.start_time)" use-exact
:aria-label="$t('broadcast_preview.start_time')"/>
</div>
</template>
</app-card>
</template>
<script>
import { imageUrl } from './mixins'
export default {
mixins: [
imageUrl('series', 'cover_image', 'seriesCoverImage'),
imageUrl('broadcast', 'cover_image', 'broadcastCoverImage')
],
props: {
broadcast: Object,
series: Object
},
computed: {
coverImage () {
return {
src: this.broadcastCoverImage || this.seriesCoverImage,
size: 72,
autoSize: true,
aspectRatio: 1,
contain: true
}
},
description () {
return this.broadcast.description || this.$t('broadcast_preview.no_description')
}
},
inject: ['dataSources']
}
</script>
<i18n lang="yaml">
en:
broadcast_preview.no_description: No description available.
broadcast_preview.start_time: Start of program
de:
broadcast_preview.no_description: Keine Beschreibung verfügbar.
broadcast_preview.start_time: Sendungsbeginn
</i18n>
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