diff options
author | ThibG <thib@sitedethib.com> | 2019-03-13 16:55:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 16:55:07 +0100 |
commit | 3005e473a0df4d2ea942dcc33e01c5e4c15b81fa (patch) | |
tree | 8d0b0e635bf12a56ae99278ab206684da2a9aad1 /app/controllers/about_controller.rb | |
parent | c2857c976c7d4a8bbd02c3c18569913f2bf8a034 (diff) | |
parent | 387f253f3100317ae247928aa9168f431879ecb6 (diff) |
Merge pull request #957 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/about_controller.rb')
-rw-r--r-- | app/controllers/about_controller.rb | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index ce1e8293c..f459bab19 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -2,21 +2,17 @@ class AboutController < ApplicationController before_action :set_pack - before_action :set_body_classes + layout 'public' + before_action :set_instance_presenter, only: [:show, :more, :terms] def show - serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer) - @initial_state_json = serializable_resource.to_json + @hide_navbar = true end - def more - render layout: 'public' - end + def more; end - def terms - render layout: 'public' - end + def terms; end private @@ -27,21 +23,10 @@ class AboutController < ApplicationController helper_method :new_user def set_pack - use_pack action_name == 'show' ? 'about' : 'common' + use_pack 'common' end def set_instance_presenter @instance_presenter = InstancePresenter.new end - - def set_body_classes - @body_classes = 'with-modals' - end - - def initial_state_params - { - settings: { known_fediverse: Setting.show_known_fediverse_at_about_page }, - token: current_session&.token, - } - end end |