Browse Source

Show a sad-face icon when upload error occurs

pull/170/head
Michael Olund 5 years ago
parent
commit
75241f6daa
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      vue/src/components/Uploader/Image.vue

+ 7
- 2
vue/src/components/Uploader/Image.vue View File

@ -2,7 +2,8 @@
<div>
<div :class="['image-wrap', isValidImage ? 'valid' : '']" @click.prevent="showPreview($event)">
<img v-if="isValidImage" :src="file.objectURL" :style="imageStyle"/>
<i class="fa fa-file-pdf-o" v-if="file.type === 'application/pdf'"></i>
<i class="fa fa-file-pdf-o" v-if="!this.file.error && file.type === 'application/pdf'"></i>
<i class="fa fa-frown-o" v-if="this.file.error"></i>
<button type="button" class="btn-remove" @click.prevent="$emit('removeclick')" aria-label="Delete">
<i class="fa fa-times-circle"></i>
</button>
@ -89,7 +90,7 @@ export default {
left: 0;
}
i.fa-file-pdf-o {
i.fa-file-pdf-o, i.fa-frown-o {
display: block;
font-size: 105px;
margin-left: 32px;
@ -98,6 +99,10 @@ export default {
top: 0;
}
i.fa-frown-o {
color: #EEE;
}
&::after {
font-family: FontAwesome;
content: "\f06e";


Loading…
Cancel
Save