diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6ad13e4..fd857a64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Updated StoryController, orientate story media and strip exif ([07a13fcf](https://github.com/pixelfed/pixelfed/commit/07a13fcf)) - Updated admin reports, fixed 404 bug ([dbd5c4cf](https://github.com/pixelfed/pixelfed/commit/dbd5c4cf)) - Updated AdminController, abstracted dashboard stats to AdminStatsService ([41abe9d2](https://github.com/pixelfed/pixelfed/commit/41abe9d2)) +- Updated StoryCompose component, added upload progress page ([2de3c56f](https://github.com/pixelfed/pixelfed/commit/2de3c56f)) ### Changed diff --git a/public/js/story-compose.js b/public/js/story-compose.js index 6efb0c458..c47dd5c61 100644 Binary files a/public/js/story-compose.js and b/public/js/story-compose.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index e15e3271b..89fe1711b 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ 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; } };