Skip to content
Snippets Groups Projects
Commit d96c7ae5 authored by syuilo's avatar syuilo
Browse files

Fix #1156

parent 41635ca3
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
:alt="file.name"
:title="file.name"
@load="onImageLoaded"
:style="`background-color:rgb(${ file.properties.average_color.join(',') })`">
:style="style">
<template v-if="kind != 'image'">%fa:file%</template>
<footer v-if="kind == 'image' && file.properties && file.properties.width && file.properties.height">
<span class="size">
......@@ -84,6 +84,11 @@ export default Vue.extend({
},
kind(): string {
return this.file.type.split('/')[0];
},
style(): any {
return this.file.properties.average_color ? {
'background-color': `rgb(${ this.file.properties.average_color.join(',') })`
} : {};
}
},
methods: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment