diff options
Diffstat (limited to 'app/helpers/profiles_helper.rb')
-rw-r--r-- | app/helpers/profiles_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/profiles_helper.rb b/app/helpers/profiles_helper.rb index 26463003f8d..05605394d57 100644 --- a/app/helpers/profiles_helper.rb +++ b/app/helpers/profiles_helper.rb @@ -73,6 +73,21 @@ module ProfilesHelper def prevent_delete_account? false end + + def user_profile_data(user) + { + profile_path: profile_path, + profile_avatar_path: profile_avatar_path, + avatar_url: avatar_icon_for_user(user, current_user: current_user), + has_avatar: user.avatar?.to_s, + gravatar_enabled: gravatar_enabled?.to_s, + gravatar_link: { hostname: Gitlab.config.gravatar.host, url: "https://#{Gitlab.config.gravatar.host}" }.to_json, + brand_profile_image_guidelines: current_appearance&.profile_image_guidelines? ? brand_profile_image_guidelines : '', + cropper_css_path: ActionController::Base.helpers.stylesheet_path('lazy_bundles/cropper.css'), + user_path: user_path(current_user), + **user_status_properties(user) + } + end end ProfilesHelper.prepend_mod |