diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-02-28 00:34:57 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-02-28 00:34:57 +0900 |
| commit | d96c7ae52887a5c50fb18f5819d1c44412f71bb6 (patch) | |
| tree | 60fbbd466e691438d0640ef9c5018895a46590f8 /src/web | |
| parent | oops (diff) | |
| download | misskey-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.vue | 7 |
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: { |