[web] Add cover artwork for the streams added from the cue

This commit is contained in:
Alain Nussbaumer
2025-04-27 08:39:33 +02:00
parent bbf7c28349
commit c38f35d3f9
3 changed files with 15 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
<template>
<figure class="figure has-shadow">
<img v-lazy="{ src: url, lifecycle }" @click="$emit('click')" />
<img v-lazy="source" @click="$emit('click')" />
</figure>
</template>
@@ -17,16 +17,21 @@ export default {
data() {
return {
font: { family: 'sans-serif', weight: 'bold' },
lifecycle: {
error: (el) => {
el.src = this.dataURI()
}
},
size: 600
}
},
methods: {
dataURI() {
computed: {
source() {
return {
src: this.url || this.uri,
lifecycle: {
error: (el) => {
el.src = this.uri
}
}
}
},
uri() {
return renderSVG({
alternate: this.caption,
caption: this.caption.substring(0, 2),