public_timelines_controller.rb 528 B

1234567891011121314151617181920212223242526
  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