aboutsummaryrefslogtreecommitdiff
path: root/src/components/image_cropper
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/image_cropper')
-rw-r--r--src/components/image_cropper/image_cropper.js15
-rw-r--r--src/components/image_cropper/image_cropper.vue11
2 files changed, 1 insertions, 25 deletions
diff --git a/src/components/image_cropper/image_cropper.js b/src/components/image_cropper/image_cropper.js
index 59e4d07e..e8d5ec6d 100644
--- a/src/components/image_cropper/image_cropper.js
+++ b/src/components/image_cropper/image_cropper.js
@@ -2,12 +2,10 @@ import Cropper from 'cropperjs'
import 'cropperjs/dist/cropper.css'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
- faTimes,
faCircleNotch
} from '@fortawesome/free-solid-svg-icons'
library.add(
- faTimes,
faCircleNotch
)
@@ -53,8 +51,7 @@ const ImageCropper = {
cropper: undefined,
dataUrl: undefined,
filename: undefined,
- submitting: false,
- submitError: null
+ submitting: false
}
},
computed: {
@@ -66,9 +63,6 @@ const ImageCropper = {
},
cancelText () {
return this.cancelButtonLabel || this.$t('image_cropper.cancel')
- },
- submitErrorMsg () {
- return this.submitError && this.submitError instanceof Error ? this.submitError.toString() : this.submitError
}
},
methods: {
@@ -82,12 +76,8 @@ const ImageCropper = {
},
submit (cropping = true) {
this.submitting = true
- this.avatarUploadError = null
this.submitHandler(cropping && this.cropper, this.file)
.then(() => this.destroy())
- .catch((err) => {
- this.submitError = err
- })
.finally(() => {
this.submitting = false
})
@@ -113,9 +103,6 @@ const ImageCropper = {
reader.readAsDataURL(this.file)
this.$emit('changed', this.file, reader)
}
- },
- clearError () {
- this.submitError = null
}
},
mounted () {
diff --git a/src/components/image_cropper/image_cropper.vue b/src/components/image_cropper/image_cropper.vue
index 448461b4..8c48a387 100644
--- a/src/components/image_cropper/image_cropper.vue
+++ b/src/components/image_cropper/image_cropper.vue
@@ -37,17 +37,6 @@
icon="circle-notch"
/>
</div>
- <div
- v-if="submitError"
- class="alert error"
- >
- {{ submitErrorMsg }}
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="times"
- @click="clearError"
- />
- </div>
</div>
<input
ref="input"