From 1f09b4f5c5e06bdfe1f370474008effebd1b9513 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 6 Feb 2021 21:00:42 -0700 Subject: [PATCH] Revert ComposeModal --- .../assets/js/components/ComposeModal.vue | 114 ++---------------- 1 file changed, 12 insertions(+), 102 deletions(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index fc058a5f5..393a1d6dc 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -59,13 +59,11 @@ - - - - {{media.length}} - - {{pageTitle}} - + + + {{media.length}} + + {{pageTitle}} @@ -563,34 +561,6 @@

-
-
-
- Loading... -
-

- Processing Media -

-

- This may take a few seconds. -

-
-
- -
-
-
- Loading... -
-

- Processing Media -

-

- This may take a few seconds. -

-
-
- @@ -715,17 +685,12 @@ export default { 'editMedia', 'cameraRoll', 'tagPeopleHelp', - 'textOptions', - 'processingVideo', - 'processingPhoto' + 'textOptions' ], cameraRollMedia: [], taggedUsernames: [], taggedPeopleSearch: null, - textMode: false, - isProcessingMedia: false, - processPhotoInterval: undefined, - processVideoInterval: undefined + textMode: false } }, @@ -825,14 +790,9 @@ export default { self.ids.push(e.data.id); self.media.push(e.data); self.uploading = false; - - if(e.data.mime == 'video/mp4') { - self.processVideo(e.data); - return; - } else { - self.processPhoto(e.data); - return; - } + setTimeout(function() { + self.page = 2; + }, 300); }).catch(function(e) { switch(e.response.status) { case 451: @@ -1205,6 +1165,7 @@ export default { ctx.clearRect(0, 0, image.width, image.height); } } + }, tagSearch(input) { @@ -1247,58 +1208,7 @@ export default { showTextOptions() { this.page = 'textOptions'; this.pageTitle = 'Text Post Options'; - }, - - processPhoto(media) { - this.page = 'processingPhoto'; - this.pageTitle = ''; - this.processPhotoCheck(media); - }, - - processPhotoCheck(media) { - this.isProcessingMedia = true; - this.processMediaCheck(media); - this.processPhotoInterval = setInterval(() => { - this.processMediaCheck(media); - }, 2500); - }, - - processVideo(media) { - this.page = 'processingVideo'; - this.pageTitle = ''; - this.processVideoCheck(media); - }, - - processVideoCheck(media) { - this.isProcessingMedia = true; - this.processMediaCheck(media, 'video'); - this.processVideoInterval = setInterval(() => { - this.processMediaCheck(media, 'video'); - }, 2500); - }, - - processMediaCheck(media, type = 'photo') { - return axios.get('/api/compose/v0/media/processing', { - params: { - id: media.id - } - }).then(res => { - let data = res.data; - if(data.finished === true) { - this.isProcessingMedia = false; - this.page = 3; - if(type == 'photo') { - clearInterval(this.processPhotoInterval); - } else if (type == 'video') { - clearInterval(this.processVideoInterval); - } else { - } - return; - } - }); } - - } } - + \ No newline at end of file