Use cropped covers/avatars to reduce bandwidth use

This commit is contained in:
Eliot Berriot 2018-07-18 15:37:07 +02:00
parent 63df2e29cb
commit 979c554b4a
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
23 changed files with 161 additions and 39 deletions

View file

@ -4,7 +4,7 @@
<div :class="['ui', 'centered', 'active', 'inline', 'loader']"></div>
</div>
<template v-if="album">
<div :class="['ui', 'head', {'with-background': album.cover}, 'vertical', 'center', 'aligned', 'stripe', 'segment']" :style="headerStyle" v-title="album.title">
<div :class="['ui', 'head', {'with-background': album.cover.original}, 'vertical', 'center', 'aligned', 'stripe', 'segment']" :style="headerStyle" v-title="album.title">
<div class="segment-content">
<h2 class="ui center aligned icon header">
<i class="circular inverted sound yellow icon"></i>
@ -98,10 +98,10 @@ export default {
return 'https://musicbrainz.org/release/' + this.album.mbid
},
headerStyle () {
if (!this.album.cover) {
if (!this.album.cover.original) {
return ''
}
return 'background-image: url(' + this.$store.getters['instance/absoluteUrl'](this.album.cover) + ')'
return 'background-image: url(' + this.$store.getters['instance/absoluteUrl'](this.album.cover.original) + ')'
}
},
watch: {