[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>
<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}`
},

View File

@ -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')
},