diff --git a/index.html b/index.html index 93d9d6fd..ec831c41 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Pleroma +
diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index 8ae86a8d..3f2e3964 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -11,11 +11,24 @@ const mediaUpload = { const file = target.files[0] const formData = new FormData() formData.append('media', file) + + self.$emit('uploading') + self.uploading = true + statusPosterService.uploadMedia({ store, formData }) .then((fileData) => { self.$emit('uploaded', fileData) + self.uploading = false + }, (error) => { + self.$emit('upload-failed') + self.uploading = false }) }) + }, + data () { + return { + uploading: false + } } } diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue index a62d8316..f2f0b83f 100644 --- a/src/components/media_upload/media_upload.vue +++ b/src/components/media_upload/media_upload.vue @@ -1,7 +1,8 @@