From da8c3bed5cb3f9515683b53f03701e076399cf6a Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Sun, 6 Nov 2022 01:13:19 +0100 Subject: [PATCH] Don't show trending statuses in public web UI --- app/controllers/api/v1/trends/statuses_controller.rb | 1 + .../glitch/features/ui/components/navigation_panel.js | 4 ++-- .../mastodon/features/ui/components/navigation_panel.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/trends/statuses_controller.rb b/app/controllers/api/v1/trends/statuses_controller.rb index c275d5fc81..5a7a41e3a7 100644 --- a/app/controllers/api/v1/trends/statuses_controller.rb +++ b/app/controllers/api/v1/trends/statuses_controller.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Api::V1::Trends::StatusesController < Api::BaseController + before_action :require_user!, only: [:show], if: :require_auth? before_action :set_statuses after_action :insert_pagination_headers diff --git a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js index affb5ec478..bb444fa654 100644 --- a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js +++ b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js @@ -55,9 +55,9 @@ class NavigationPanel extends React.Component { )} {showTrends ? ( - + (signedIn || timelinePreview) ? : <> ) : ( - + (signedIn || timelinePreview) ? : <> )} {(signedIn || timelinePreview) && ( diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.js b/app/javascript/mastodon/features/ui/components/navigation_panel.js index 4e9e39e2f5..2959cfcfed 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.js +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.js @@ -59,9 +59,9 @@ class NavigationPanel extends React.Component { )} {showTrends ? ( - + (signedIn || timelinePreview) ? : <> ) : ( - + (signedIn || timelinePreview) ? : <> )} {(signedIn || timelinePreview) && (