aboutsummaryrefslogtreecommitdiff
path: root/src/components/image_cropper/image_cropper.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2021-02-01 19:39:57 +0200
committerHenry Jameson <me@hjkos.com>2021-02-01 19:39:57 +0200
commit8958f386bef9317ff5782fa0f16164d7fbc2af21 (patch)
tree8c33fed5331c18023d608fbb366c464783559220 /src/components/image_cropper/image_cropper.js
parente695506c514e49964dfd81c7db5c5b4d4918f47d (diff)
parentde66267a07eb018cc0309ff6f9dd896d53ba3ff4 (diff)
Merge remote-tracking branch 'origin/develop' into settings-changed
* origin/develop: (306 commits) fallback if shadows aren't defined Translated using Weblate (Chinese (Traditional)) Translated using Weblate (Ukrainian) Translated using Weblate (Italian) Translated using Weblate (Ukrainian) Translated using Weblate (Portuguese) Translated using Weblate (Italian) Translated using Weblate (Russian) Translated using Weblate (Portuguese) Translated using Weblate (Russian) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) ...
Diffstat (limited to 'src/components/image_cropper/image_cropper.js')
-rw-r--r--src/components/image_cropper/image_cropper.js21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/components/image_cropper/image_cropper.js b/src/components/image_cropper/image_cropper.js
index 01361e25..e8d5ec6d 100644
--- a/src/components/image_cropper/image_cropper.js
+++ b/src/components/image_cropper/image_cropper.js
@@ -1,5 +1,13 @@
import Cropper from 'cropperjs'
import 'cropperjs/dist/cropper.css'
+import { library } from '@fortawesome/fontawesome-svg-core'
+import {
+ faCircleNotch
+} from '@fortawesome/free-solid-svg-icons'
+
+library.add(
+ faCircleNotch
+)
const ImageCropper = {
props: {
@@ -43,8 +51,7 @@ const ImageCropper = {
cropper: undefined,
dataUrl: undefined,
filename: undefined,
- submitting: false,
- submitError: null
+ submitting: false
}
},
computed: {
@@ -56,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: {
@@ -72,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
})
@@ -103,9 +103,6 @@ const ImageCropper = {
reader.readAsDataURL(this.file)
this.$emit('changed', this.file, reader)
}
- },
- clearError () {
- this.submitError = null
}
},
mounted () {