aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment/attachment.vue
diff options
context:
space:
mode:
authorValD <maghtpol@gmail.com>2018-12-12 03:33:53 +0530
committerValD <maghtpol@gmail.com>2018-12-12 03:33:53 +0530
commit7b4e08dd93520e3dc1113d76e097b998d12b0f3c (patch)
treefa444345288b8c051934bdb858b4785b1ab9760e /src/components/attachment/attachment.vue
parentb195ce12e1fcf28ea1e74a1231f9a31dcf71af0b (diff)
added config for preload and made attachment responsive to it
Diffstat (limited to 'src/components/attachment/attachment.vue')
-rw-r--r--src/components/attachment/attachment.vue3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 6c8a04ed..1b1956e0 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -9,8 +9,7 @@
<div class="hider" v-if="nsfw && hideNsfwLocal && !hidden">
<a href="#" @click.prevent="toggleHidden()">Hide</a>
</div>
-
- <a v-if="type === 'image'" class="image-attachment" :class="{'hidden': hidden}" :href="attachment.url" target="_blank" :title="attachment.description">
+ <a v-if="type === 'image' && (!hidden || preloadNsfwImage)" class="image-attachment" :class="{'hidden': hidden && preloadNsfwImage}" :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>