aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment/attachment.vue
diff options
context:
space:
mode:
authorshpuld <shpuld@gmail.com>2017-03-09 12:45:12 +0200
committershpuld <shpuld@gmail.com>2017-03-09 12:45:12 +0200
commitd99b9bdac124b6353adfc9ea0fb52a3b380b91a2 (patch)
tree7a901e3264dffb7fec2a3c051653023bb0eb6ffe /src/components/attachment/attachment.vue
parent507fe7905052e2dc5e9bf3e1ee3caee5239e353b (diff)
parent64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff)
Merged with changes in develop & fixed conflicts.
Diffstat (limited to 'src/components/attachment/attachment.vue')
-rw-r--r--src/components/attachment/attachment.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index ad60acf9..8f51b891 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -1,15 +1,14 @@
<template>
- <div class="attachment" :class="type">
- <a class="image-attachment" v-if="hidden" v-on:click.prevent="toggleHidden()">
- <img :key="nsfwImage" :src="nsfwImage"></img>
+ <div class="attachment" :class="{[type]: true, loading}" :style="autoHeight">
+ <a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()">
+ <img :key="nsfwImage" :src="nsfwImage"/>
</a>
<div class="hider" v-if="nsfw && hideNsfwLocal && !hidden">
<a href="#" @click.prevent="toggleHidden()">Hide</a>
</div>
- <a class="image-attachment" v-if="type === 'image' && !hidden"
- :href="attachment.url" target="_blank">
- <img class="base05-border" referrerpolicy="no-referrer" :src="attachment.large_thumb_url || attachment.url"></img>
+ <a v-if="type === 'image' && !hidden" class="image-attachment" :href="attachment.url" target="_blank">
+ <img class="base05-border" referrerpolicy="no-referrer" :src="attachment.large_thumb_url || attachment.url"/>
</a>
<video v-if="type === 'video' && !hidden" :src="attachment.url" controls></video>
@@ -18,7 +17,7 @@
<div @click.prevent="linkClicked" v-if="type === 'html' && attachment.oembed" class="oembed">
<div v-if="attachment.thumb_url" class="image">
- <img :src="attachment.thumb_url"></img>
+ <img :src="attachment.thumb_url"/>
</div>
<div class="text">
<h1><a :href="attachment.url">{{attachment.oembed.title}}</a></h1>
@@ -45,6 +44,10 @@
display: flex;
}
+ &.loading {
+ cursor: progress;
+ }
+
.hider {
position: absolute;
margin: 10px;
@@ -111,7 +114,6 @@
flex: 1;
img {
- width: 100%;
border-style: solid;
border-width: 1px;
border-radius: 5px;