X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/721f8e00b287974d6346e3c62bb8d0d599cc7db3..045af66d438a7fa3567cb4a10ea2f6a255e742c8:/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)