diff --git a/app/controllers/concerns/web_app_controller_concern.rb b/app/controllers/concerns/web_app_controller_concern.rb index ebbdba59af0..677f0b03eb9 100644 --- a/app/controllers/concerns/web_app_controller_concern.rb +++ b/app/controllers/concerns/web_app_controller_concern.rb @@ -7,7 +7,6 @@ module WebAppControllerConcern vary_by 'Accept, Accept-Language, Cookie' before_action :redirect_unauthenticated_to_permalinks! - before_action :set_app_body_class content_security_policy do |p| policy = ContentSecurityPolicy.new @@ -24,10 +23,6 @@ module WebAppControllerConcern !(ENV['ONE_CLICK_SSO_LOGIN'] == 'true' && ENV['OMNIAUTH_ONLY'] == 'true' && Devise.omniauth_providers.length == 1) && current_user.nil? end - def set_app_body_class - @body_classes = 'app-body' - end - def redirect_unauthenticated_to_permalinks! return if user_signed_in? && current_account.moved_to_account_id.nil? diff --git a/app/views/shared/_web_app.html.haml b/app/views/shared/_web_app.html.haml index 89d6ee567d4..4f9a20a9f4b 100644 --- a/app/views/shared/_web_app.html.haml +++ b/app/views/shared/_web_app.html.haml @@ -1,3 +1,4 @@ +- content_for :body_classes, 'app-body' - content_for :header_tags do - if user_signed_in? = preload_pack_asset 'features/compose.js' diff --git a/spec/system/about_spec.rb b/spec/system/about_spec.rb index f832802f91d..d7fd7f51a1c 100644 --- a/spec/system/about_spec.rb +++ b/spec/system/about_spec.rb @@ -8,5 +8,6 @@ RSpec.describe 'About page' do expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_css('body', class: 'app-body') end end diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb index c1ce4e17261..0838b3d8e7e 100644 --- a/spec/system/home_spec.rb +++ b/spec/system/home_spec.rb @@ -11,6 +11,7 @@ RSpec.describe 'Home page' do expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_css('body', class: 'app-body') end end @@ -20,6 +21,7 @@ RSpec.describe 'Home page' do expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_css('body', class: 'app-body') end end end diff --git a/spec/system/privacy_spec.rb b/spec/system/privacy_spec.rb index 631440ebb2c..f2e4d5a9931 100644 --- a/spec/system/privacy_spec.rb +++ b/spec/system/privacy_spec.rb @@ -8,5 +8,6 @@ RSpec.describe 'Privacy policy page' do expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_css('body', class: 'app-body') end end diff --git a/spec/system/tags_spec.rb b/spec/system/tags_spec.rb index f39c6bf0d8d..9da5768c7f2 100644 --- a/spec/system/tags_spec.rb +++ b/spec/system/tags_spec.rb @@ -13,6 +13,7 @@ RSpec.describe 'Tags' do expect(page) .to have_css('noscript', text: /Mastodon/) + .and have_css('body', class: 'app-body') .and have_private_cache_control end end