闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
528 B

  1. # frozen_string_literal: true
  2. class PublicTimelinesController < ApplicationController
  3. layout 'public'
  4. before_action :authenticate_user!, if: :whitelist_mode?
  5. before_action :require_enabled!
  6. before_action :set_body_classes
  7. before_action :set_instance_presenter
  8. def show; end
  9. private
  10. def require_enabled!
  11. not_found unless Setting.timeline_preview
  12. end
  13. def set_body_classes
  14. @body_classes = 'with-modals'
  15. end
  16. def set_instance_presenter
  17. @instance_presenter = InstancePresenter.new
  18. end
  19. end