From a16a4ddbd0be1bac9413e61c56e2a5bcffe23914 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 14 Apr 2025 01:37:35 -0600 Subject: [PATCH] Update Hashtag component, add custom filter support --- resources/assets/components/Hashtag.vue | 31 +++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/resources/assets/components/Hashtag.vue b/resources/assets/components/Hashtag.vue index 62665c1db..52af9af49 100644 --- a/resources/assets/components/Hashtag.vue +++ b/resources/assets/components/Hashtag.vue @@ -56,7 +56,11 @@
- + + + Filtered + +
@@ -79,7 +83,15 @@
-
+
+ + + {{formatCount(status.favourites_count)}} + + + + {{formatCount(status.reblogs_count)}} + {{formatCount(status.reply_count)}} @@ -197,7 +209,12 @@ }) .then(res => { if(res.data && res.data.length) { - this.feed = res.data; + this.feed = res.data.map(s => { + if(s.filtered) { + s.sensitive = true; + } + return s; + }); this.maxId = res.data[res.data.length - 1].id; this.canLoadMore = true; } else { @@ -233,7 +250,13 @@ }) .then(res => { if(res.data && res.data.length) { - this.feed.push(...res.data); + const data = res.data.map(s => { + if(s.filtered) { + s.sensitive = true; + } + return s; + }); + this.feed.push(...data); this.maxId = res.data[res.data.length - 1].id; this.canLoadMore = true; } else {