preload nsfw image

This commit is contained in:
ValD 2018-12-12 02:28:36 +05:30
parent a8acba8cb2
commit b195ce12e1

View file

@ -10,7 +10,7 @@
<a href="#" @click.prevent="toggleHidden()">Hide</a>
</div>
<a v-if="type === 'image' && !hidden" class="image-attachment" :href="attachment.url" target="_blank" :title="attachment.description">
<a v-if="type === 'image'" class="image-attachment" :class="{'hidden': hidden}" :href="attachment.url" target="_blank" :title="attachment.description">
<StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
</a>
@ -161,6 +161,10 @@
display: flex;
flex: 1;
&.hidden {
display: none;
}
.still-image {
width: 100%;
height: 100%;