From a7346f2145cade059ea6e242c8406cf3f446ffe4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 9 Feb 2022 20:48:19 -0700 Subject: [PATCH 1/5] Update PostComponent.vue, filter out non text comments --- resources/assets/js/components/PostComponent.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 9499cd8df..c271c805b 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -1030,7 +1030,7 @@ export default { self.media = self.status.media_attachments; self.content = response.data.status.content; self.status.emojis.forEach(function(emoji) { - let img = `${emoji.shortcode}`; + let img = `${emoji.shortcode}`; self.content = self.content.replace(`:${emoji.shortcode}:`, img); }); self.likesPage = 2; @@ -1384,9 +1384,9 @@ export default { axios.get(url) .then(response => { let self = this; - this.results = this.layout == 'metro' ? - _.reverse(response.data.data) : - response.data.data; + this.results = response.data.data.filter(p => { + return p.pf_type == 'text'; + }); this.pagination = response.data.meta.pagination; if(this.results.length > 0) { $('.load-more-link').removeClass('d-none'); From a83b0c9223c3927932764bcb4e42e740c4908a3b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 9 Feb 2022 20:58:53 -0700 Subject: [PATCH 2/5] Update components --- resources/assets/js/components/Timeline.vue | 12 +++++++++-- .../js/components/partials/StatusCard.vue | 2 +- .../presenter/PhotoAlbumPresenter.vue | 16 +++++++++++++- .../components/presenter/PhotoPresenter.vue | 21 +++++++++++++++++-- 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 4e2e88852..62358c218 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -190,6 +190,14 @@

Discover new posts and people

+
+
+

A New Experience Awaits

+

Try out an early release of our new design

+

+ Try new UI +

+
@@ -541,7 +549,7 @@ }*/ if(this.config.ab.spa === true) { - this.showPromo = localStorage.getItem('pf_metro_ui.exp.spa') == 'false' ? false : true; + this.showPromo = localStorage.getItem('pf_metro_ui.exp.spa' + new Date().getMonth()) == 'false' ? false : true; } if(localStorage.getItem('pf_metro_ui.exp.rec') == 'false') { @@ -1086,7 +1094,7 @@ }, hidePromo() { - localStorage.setItem('pf_metro_ui.exp.spa', 'false'); + localStorage.setItem('pf_metro_ui.exp.spa' + new Date().getMonth(), 'false'); this.showPromo = false; } }, diff --git a/resources/assets/js/components/partials/StatusCard.vue b/resources/assets/js/components/partials/StatusCard.vue index 0b60723b2..375799838 100644 --- a/resources/assets/js/components/partials/StatusCard.vue +++ b/resources/assets/js/components/partials/StatusCard.vue @@ -250,7 +250,7 @@ this.profile = window._sharedData.curUser; this.content = this.status.content; this.status.emojis.forEach(function(emoji) { - let img = `${emoji.shortcode}`; + let img = `${emoji.shortcode}`; self.content = self.content.replace(`:${emoji.shortcode}:`, img); }); }, diff --git a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue index 07da4785d..35b78fe7e 100644 --- a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue +++ b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue @@ -25,7 +25,13 @@ - +