mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05:00
[web] Remove maxwidth and maxheight that is not used
This commit is contained in:
parent
84f209b520
commit
617599ee0c
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<figure>
|
||||
<img
|
||||
v-lazy="{ src: artwork_url_with_size, lifecycle: lazy_lifecycle }"
|
||||
v-lazy="{ src: artwork_url, lifecycle: lazy_lifecycle }"
|
||||
@click="$emit('click')"
|
||||
/>
|
||||
</figure>
|
||||
@ -9,7 +9,6 @@
|
||||
|
||||
<script>
|
||||
import { renderSVG } from '@/lib/SVGRenderer'
|
||||
import webapi from '@/webapi'
|
||||
|
||||
export default {
|
||||
name: 'CoverArtwork',
|
||||
@ -17,8 +16,6 @@ export default {
|
||||
album: { default: '', type: String },
|
||||
artist: { default: '', type: String },
|
||||
artwork_url: { default: '', type: String },
|
||||
maxheight: { default: 600, type: Number },
|
||||
maxwidth: { default: 600, type: Number }
|
||||
},
|
||||
emits: ['click'],
|
||||
|
||||
@ -38,17 +35,6 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
artwork_url_with_size() {
|
||||
if (this.maxwidth > 0 && this.maxheight > 0) {
|
||||
return webapi.artwork_url_append_size_params(
|
||||
this.artwork_url,
|
||||
this.maxwidth,
|
||||
this.maxheight
|
||||
)
|
||||
}
|
||||
return webapi.artwork_url_append_size_params(this.artwork_url)
|
||||
},
|
||||
|
||||
alt_text() {
|
||||
return `${this.artist} - ${this.album}`
|
||||
},
|
||||
|
@ -22,16 +22,6 @@ axios.interceptors.response.use(
|
||||
)
|
||||
|
||||
export default {
|
||||
artwork_url_append_size_params(artworkUrl, maxwidth = 600, maxheight = 600) {
|
||||
if (artworkUrl && artworkUrl.startsWith('/')) {
|
||||
if (artworkUrl.includes('?')) {
|
||||
return `${artworkUrl}&maxwidth=${maxwidth}&maxheight=${maxheight}`
|
||||
}
|
||||
return `${artworkUrl}?maxwidth=${maxwidth}&maxheight=${maxheight}`
|
||||
}
|
||||
return artworkUrl
|
||||
},
|
||||
|
||||
config() {
|
||||
return axios.get('./api/config')
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user