From c58af88d4ade27a9797e10350cf341fc999280c3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 23:32:15 -0600 Subject: [PATCH] Update ComposeModal.vue component --- .../assets/js/components/ComposeModal.vue | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 0ff342d84..0424895cc 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; }); }); },