mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-14 11:21:55 -04:00
[web] Add cover artwork for the streams added from the cue
This commit is contained in:
parent
bbf7c28349
commit
c38f35d3f9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<figure class="figure has-shadow">
|
<figure class="figure has-shadow">
|
||||||
<img v-lazy="{ src: url, lifecycle }" @click="$emit('click')" />
|
<img v-lazy="source" @click="$emit('click')" />
|
||||||
</figure>
|
</figure>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -17,16 +17,21 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
font: { family: 'sans-serif', weight: 'bold' },
|
font: { family: 'sans-serif', weight: 'bold' },
|
||||||
lifecycle: {
|
|
||||||
error: (el) => {
|
|
||||||
el.src = this.dataURI()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
size: 600
|
size: 600
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
computed: {
|
||||||
dataURI() {
|
source() {
|
||||||
|
return {
|
||||||
|
src: this.url || this.uri,
|
||||||
|
lifecycle: {
|
||||||
|
error: (el) => {
|
||||||
|
el.src = this.uri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
uri() {
|
||||||
return renderSVG({
|
return renderSVG({
|
||||||
alternate: this.caption,
|
alternate: this.caption,
|
||||||
caption: this.caption.substring(0, 2),
|
caption: this.caption.substring(0, 2),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user