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>
|
||||
<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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user