Skip to content
Snippets Groups Projects
Verified Commit 95807b38 authored by Felix Eckhofer's avatar Felix Eckhofer :man_dancing:
Browse files

Fix dark mode for users not logged in

parent afb3324c
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ module ApplicationHelper ...@@ -4,7 +4,7 @@ module ApplicationHelper
attributes[:loggedin_uid] = current_user.id if user_signed_in? attributes[:loggedin_uid] = current_user.id if user_signed_in?
attributes[:is_shiftcoordinator] = 1 if current_user&.shiftcoordinator? attributes[:is_shiftcoordinator] = 1 if current_user&.shiftcoordinator?
attributes[:languages_from] = current_user.languages_from unless current_user&.languages_from.blank? attributes[:languages_from] = current_user.languages_from unless current_user&.languages_from.blank?
attributes[:darkmode] = current_user.darkmode attributes[:darkmode] = current_user&.darkmode || "auto"
{ data: attributes } { data: attributes }
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment