From 2de3c56f4744f41dcf761cd658125089920d5956 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 27 Jan 2020 20:23:13 -0700 Subject: [PATCH 1/3] Update StoryCompose component, add upload progress --- resources/assets/js/components/StoryCompose.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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; } }; From 14f2c09df581ce6713c07e30c4c60ab5e3ae9a81 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 27 Jan 2020 20:24:12 -0700 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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 From 405bcd7d7a70a18c166f141819331a9441ae2c60 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 27 Jan 2020 20:24:46 -0700 Subject: [PATCH 3/3] Update compiled assets --- public/js/story-compose.js | Bin 70104 -> 70498 bytes public/mix-manifest.json | Bin 1815 -> 1815 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/story-compose.js b/public/js/story-compose.js index 6efb0c458b453a3fc86baf33a0446849d83b3d6f..c47dd5c61c1af67383b2e263bf44054a1fe616b8 100644 GIT binary patch delta 1103 zcmZ`&UuaWT80W;MY0_yFwQOuL@zT0`&B^tqwWHqVG;9xJ)Wy_Qhf=$F)5PS4q&H1& zl6zuDoQ1(2&Ub#_ zzu)(rkMlh^*YxxGri+ujixPz|;iP~K_609H=)N~3Az-kFybn?KH}7epp`bJ=w7G&3 zjtMdiby}LEv!SsQ!Y)M3alyN(6?4U0MpNSIXp()7z2-OAW!tWcIVG7O8!ir;*TvUt z_EQ;6%bUMQwpQmx+LPWK`%~^}3rf;%qKgg3KweAc6NN&Ut@Q19E3OuD8HEP+`?9fs z#7*EKUHq`bb4UNJ?c@AlDe(VI7yMiYCkzX+MdSZJnt@_0qZU%|2H&8r-#33KPW-@08C8-%B1Xc#m1*v=L@qz{t>rtIlZ3K{2=6P$;VRG8DX;z%m1 zl@grHWwl} zh|Z_k!An1SHoSX_FZ_FpjR>>v^0ijrvR&nXxZ~v%%J$yu@gtE>XN1Lf22;&C(>_!C{%r!sp!Z1JDMk|#O2+oB_sZz=Ik#Zw;+d_Fg z*2}(JkO4hjFrVv}Zw>%*EMBn#t;IU;WseubcB`bpUSEQL%g8MsJGG=fkGQvV=+$*E z*&P(*qMt-W14DO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