diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 0ff342d8..0424895c 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -29,13 +29,16 @@
-

Uploading...

+

Uploading ... ({{uploadProgress}}%)

+
+

Add Photo

+
-

Click here to add photos.

+

Click here to add photos

@@ -48,7 +51,7 @@ v-model="carouselCursor" > -
+
@@ -94,20 +97,9 @@
-
+
-

- -

-
-
-
-
-

- - Draft - -

+
@@ -363,15 +355,19 @@ export default { axios.post('/api/v1/media', form, xhrConfig) .then(function(e) { + self.uploadProgress = 100; self.ids.push(e.data.id); self.media.push(e.data); setTimeout(function() { self.uploading = false; - }, 500); + }, 1000); }).catch(function(e) { + self.uploading = false; + io.value = null; swal('Oops, something went wrong!', 'An unexpected error occurred.', 'error'); }); io.value = null; + self.uploadProgress = 0; }); }); },