From e5aa506c5a166ca069329436a5e827f4bad0150b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 5 Aug 2020 01:50:34 -0600 Subject: [PATCH] Update Hashtag.vue, add nsfw toggle. Fixes #2225 --- .../Api/StatusHashtagTransformer.php | 2 +- resources/assets/js/components/Hashtag.vue | 31 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/app/Transformer/Api/StatusHashtagTransformer.php b/app/Transformer/Api/StatusHashtagTransformer.php index 1dfdba3b..f5a8d79e 100644 --- a/app/Transformer/Api/StatusHashtagTransformer.php +++ b/app/Transformer/Api/StatusHashtagTransformer.php @@ -18,7 +18,7 @@ class StatusHashtagTransformer extends Fractal\TransformerAbstract 'id' => (int) $status->id, 'type' => $status->type, 'url' => $status->url(), - 'thumb' => $status->thumb(), + 'thumb' => $status->thumb(true), 'filter' => $status->firstMedia()->filter_class, 'sensitive' => (bool) $status->is_nsfw, 'like_count' => $status->likes_count, diff --git a/resources/assets/js/components/Hashtag.vue b/resources/assets/js/components/Hashtag.vue index 89719331..e737859b 100644 --- a/resources/assets/js/components/Hashtag.vue +++ b/resources/assets/js/components/Hashtag.vue @@ -4,7 +4,7 @@
-
#
+
#
@@ -12,14 +12,20 @@

#{{hashtag}}

{{tags.length ? hashtagCount : '0'}} posts

-

- - -

+
+

+ + +

+
+ + +
+
@@ -30,7 +36,8 @@
-
+
+