[web] Remove maxwidth and maxheight that is not used

This commit is contained in:
Alain Nussbaumer 2024-02-28 14:28:10 +01:00
parent 84f209b520
commit 617599ee0c
2 changed files with 1 additions and 25 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<figure> <figure>
<img <img
v-lazy="{ src: artwork_url_with_size, lifecycle: lazy_lifecycle }" v-lazy="{ src: artwork_url, lifecycle: lazy_lifecycle }"
@click="$emit('click')" @click="$emit('click')"
/> />
</figure> </figure>
@ -9,7 +9,6 @@
<script> <script>
import { renderSVG } from '@/lib/SVGRenderer' import { renderSVG } from '@/lib/SVGRenderer'
import webapi from '@/webapi'
export default { export default {
name: 'CoverArtwork', name: 'CoverArtwork',
@ -17,8 +16,6 @@ export default {
album: { default: '', type: String }, album: { default: '', type: String },
artist: { default: '', type: String }, artist: { default: '', type: String },
artwork_url: { default: '', type: String }, artwork_url: { default: '', type: String },
maxheight: { default: 600, type: Number },
maxwidth: { default: 600, type: Number }
}, },
emits: ['click'], emits: ['click'],
@ -38,17 +35,6 @@ export default {
}, },
computed: { 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() { alt_text() {
return `${this.artist} - ${this.album}` return `${this.artist} - ${this.album}`
}, },

View File

@ -22,16 +22,6 @@ axios.interceptors.response.use(
) )
export default { 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() { config() {
return axios.get('./api/config') return axios.get('./api/config')
}, },