X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4a8ef3e26c7bd37cb47332f04bf0b50665c71fc3..2ca74ab3ef47143cb42403f207e438eacda08dc5:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7ce804ced..56d9a6763 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -281,7 +281,15 @@ class ApplicationController < ActionController::Base end end - helper_method :preferred_editor + def preferred_site_color_scheme + if current_user + current_user.preferences.find_by(:k => "site.color_scheme")&.v || "auto" + else + "auto" + end + end + + helper_method :preferred_editor, :preferred_site_color_scheme def update_totp if Settings.key?(:totp_key)