summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-28 00:34:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-28 00:34:57 +0900
commitd96c7ae52887a5c50fb18f5819d1c44412f71bb6 (patch)
tree60fbbd466e691438d0640ef9c5018895a46590f8 /src/web
parentoops (diff)
downloadmisskey-d96c7ae52887a5c50fb18f5819d1c44412f71bb6.tar.gz
misskey-d96c7ae52887a5c50fb18f5819d1c44412f71bb6.tar.bz2
misskey-d96c7ae52887a5c50fb18f5819d1c44412f71bb6.zip
Fix #1156
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/mobile/views/components/drive.file-detail.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/web/app/mobile/views/components/drive.file-detail.vue b/src/web/app/mobile/views/components/drive.file-detail.vue
index 9a47eeb12c..e41ebbb451 100644
--- a/src/web/app/mobile/views/components/drive.file-detail.vue
+++ b/src/web/app/mobile/views/components/drive.file-detail.vue
@@ -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: {