From 916e8f711169c15d974a68ca7cb54fad31d09760 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 15 Jul 2021 23:36:44 -0600 Subject: [PATCH] Update Timeline.vue, increase pagination limit from 3 to 12 and add empty feed placeholder --- resources/assets/js/components/Timeline.vue | 31 +++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index c8a5b6ad2..fcfa244be 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -280,17 +280,24 @@ :status="status" :recommended="true" /> + +
+
+
+

+

empty_timeline.jpg

+

We cannot find any posts for this timeline.

+

+ Discover new posts and people +

+
+
+
- -
@@ -580,7 +587,8 @@ recentFeed: this.scope === 'home' ? true : false, recentFeedMin: null, recentFeedMax: null, - reactionBar: true + reactionBar: true, + emptyFeed: false } }, @@ -687,11 +695,18 @@ axios.get(apiUrl, { params: { max_id: this.max_id, - limit: 3, + limit: 12, recent_feed: this.recentFeed } }).then(res => { let data = res.data; + + if(!data.length) { + this.loading = false; + this.emptyFeed = true; + return; + } + this.feed.push(...data); let ids = data.map(status => status.id); this.ids = ids;