diff options
| author | HJ <spam@hjkos.com> | 2018-12-12 19:01:53 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2018-12-12 19:01:53 +0000 |
| commit | 7325ff2e7adeeed9abd8f8f2876985d7702053ee (patch) | |
| tree | 4126e63e2b21d1cf3252c36a8ac83c9aa0fc0bcb /src/components/attachment/attachment.vue | |
| parent | f0fb6e6015f1cf472433f641a76a428f5a48a20f (diff) | |
| parent | b271957b4cbee7a489acccbdc84f19d3d6414412 (diff) | |
Merge branch 'dev_vald_fe/nsfw_preload' into 'develop'
preload nsfw image
Closes #193
See merge request pleroma/pleroma-fe!411
Diffstat (limited to 'src/components/attachment/attachment.vue')
| -rw-r--r-- | src/components/attachment/attachment.vue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 40e2cf1b..5eaa0d1d 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' && !hidden" class="image-attachment" :href="attachment.url" target="_blank" :title="attachment.description"> + <a v-if="type === 'image' && (!hidden || preloadImage)" class="image-attachment" :class="{'hidden': hidden && preloadImage}" :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 +160,10 @@ display: flex; flex: 1; + &.hidden { + display: none; + } + .still-image { width: 100%; height: 100%; |
