mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 01:13:48 +01:00
Fix #1156
This commit is contained in:
parent
cfe240aaa6
commit
674ebd3af5
@ -6,7 +6,7 @@
|
|||||||
:alt="file.name"
|
:alt="file.name"
|
||||||
:title="file.name"
|
:title="file.name"
|
||||||
@load="onImageLoaded"
|
@load="onImageLoaded"
|
||||||
:style="`background-color:rgb(${ file.properties.average_color.join(',') })`">
|
:style="style">
|
||||||
<template v-if="kind != 'image'">%fa:file%</template>
|
<template v-if="kind != 'image'">%fa:file%</template>
|
||||||
<footer v-if="kind == 'image' && file.properties && file.properties.width && file.properties.height">
|
<footer v-if="kind == 'image' && file.properties && file.properties.width && file.properties.height">
|
||||||
<span class="size">
|
<span class="size">
|
||||||
@ -84,6 +84,11 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
kind(): string {
|
kind(): string {
|
||||||
return this.file.type.split('/')[0];
|
return this.file.type.split('/')[0];
|
||||||
|
},
|
||||||
|
style(): any {
|
||||||
|
return this.file.properties.average_color ? {
|
||||||
|
'background-color': `rgb(${ this.file.properties.average_color.join(',') })`
|
||||||
|
} : {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user