This commit is contained in:
syuilo 2018-12-09 13:25:46 +09:00
parent b1b5a795c8
commit 3acd2e0f0c
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,8 @@
<misskey-flavored-markdown class="text" v-if="message.text" ref="text" :text="message.text" :i="$store.state.i"/> <misskey-flavored-markdown class="text" v-if="message.text" ref="text" :text="message.text" :i="$store.state.i"/>
<div class="file" v-if="message.file"> <div class="file" v-if="message.file">
<a :href="message.file.url" target="_blank" :title="message.file.name"> <a :href="message.file.url" target="_blank" :title="message.file.name">
<img v-if="message.file.type.split('/')[0] == 'image'" :src="message.file.url" :alt="message.file.name"/> <img v-if="message.file.type.split('/')[0] == 'image'" :src="message.file.url" :alt="message.file.name"
:style="{ backgroundColor: message.file.properties.avgColor && message.file.properties.avgColor.length == 3 ? `rgb(${message.file.properties.avgColor.join(',')})` : 'transparent' }"/>
<p v-else>{{ message.file.name }}</p> <p v-else>{{ message.file.name }}</p>
</a> </a>
</div> </div>
@ -150,7 +151,6 @@ export default Vue.extend({
> a > a
display block display block
max-width 100% max-width 100%
max-height 512px
border-radius 16px border-radius 16px
overflow hidden overflow hidden
text-decoration none text-decoration none
@ -165,7 +165,8 @@ export default Vue.extend({
display block display block
margin 0 margin 0
width 100% width 100%
height 100% max-height 512px
object-fit contain
> p > p
padding 30px padding 30px