summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/components/drive-file-thumbnail.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/views/components/drive-file-thumbnail.vue')
-rw-r--r--src/client/app/common/views/components/drive-file-thumbnail.vue12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/app/common/views/components/drive-file-thumbnail.vue b/src/client/app/common/views/components/drive-file-thumbnail.vue
index faa727f3b6..1a3ef37193 100644
--- a/src/client/app/common/views/components/drive-file-thumbnail.vue
+++ b/src/client/app/common/views/components/drive-file-thumbnail.vue
@@ -105,15 +105,11 @@ export default Vue.extend({
},
isThumbnailAvailable(): boolean {
return this.file.thumbnailUrl
- ? this.file.thumbnailUrl.endsWith('?thumbnail')
- ? (this.is === 'image' || this.is === 'video')
- : true
+ ? (this.is === 'image' || this.is === 'video')
: false;
},
background(): string {
- return this.file.properties.avgColor && this.file.properties.avgColor.length == 3
- ? `rgb(${this.file.properties.avgColor.join(',')})`
- : 'transparent';
+ return this.file.properties.avgColor || 'transparent';
}
},
mounted() {
@@ -122,10 +118,10 @@ export default Vue.extend({
},
methods: {
onThumbnailLoaded() {
- if (this.file.properties.avgColor && this.file.properties.avgColor.length == 3) {
+ if (this.file.properties.avgColor) {
anime({
targets: this.$refs.thumbnail,
- backgroundColor: `rgba(${this.file.properties.avgColor.join(',')}, 0)`,
+ backgroundColor: this.file.properties.avgColor.replace('255)', '0)'),
duration: 100,
easing: 'linear'
});