diff --git a/resources/assets/js/components/StoryCompose.vue b/resources/assets/js/components/StoryCompose.vue index 9ec338eb0..7d9ca47f8 100644 --- a/resources/assets/js/components/StoryCompose.vue +++ b/resources/assets/js/components/StoryCompose.vue @@ -79,6 +79,12 @@

+ +
+

Uploading {{uploadProgress}}%

+

Publishing Story

+
+
@@ -152,10 +158,11 @@ 'crop', 'edit', 'confirm', - 'error' + 'error', + 'uploading' ], uploading: false, - uploadProgress: 100, + uploadProgress: 0, cropper: { aspectRatio: 9/16, viewMode: 1, @@ -192,6 +199,7 @@ let self = this; self.uploading = true; let io = document.querySelector('#pf-dz'); + self.page = 'uploading'; Array.prototype.forEach.call(io.files, function(io, i) { if(self.media && self.media.length + i >= self.config.uploader.album_limit) { swal('Error', 'You can only upload ' + self.config.uploader.album_limit + ' photos per album', 'error'); @@ -213,7 +221,7 @@ let xhrConfig = { onUploadProgress: function(e) { - let progress = Math.round( (e.loaded * 100) / e.total ); + let progress = Math.floor( (e.loaded * 100) / e.total ); self.uploadProgress = progress; } };