diff --git a/app/controllers/api/v1/profiles_controller.rb b/app/controllers/api/v1/profiles_controller.rb
index bd3c2673c..ae1a1fe30 100644
--- a/app/controllers/api/v1/profiles_controller.rb
+++ b/app/controllers/api/v1/profiles_controller.rb
@@ -17,7 +17,7 @@ class Api::V1::ProfilesController < Api::BaseController
def avatar
@user.avatar.attachment.destroy! if @user.avatar.attached?
- head :ok
+ @user.reload
end
def auto_offline
diff --git a/app/javascript/dashboard/components-next/avatar/Avatar.vue b/app/javascript/dashboard/components-next/avatar/Avatar.vue
index ab87e33c9..fb23b3cff 100644
--- a/app/javascript/dashboard/components-next/avatar/Avatar.vue
+++ b/app/javascript/dashboard/components-next/avatar/Avatar.vue
@@ -132,7 +132,7 @@ const iconStyles = computed(() => ({
}));
const initialsStyles = computed(() => ({
- fontSize: `${props.size > 32 ? 16 : props.size / 2}px`,
+ fontSize: `${Math.min(props.size / 2.5, 24)}px`,
}));
const invalidateCurrentImage = () => {
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
index be1d166ab..a38046580 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
@@ -190,7 +190,6 @@ export default {
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
index 87ac25efa..d86329b76 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
@@ -1,8 +1,6 @@
-
-
-
-
![]()
-
-
-
-
-
-
-
-
-
diff --git a/app/views/api/v1/profiles/avatar.json.jbuilder b/app/views/api/v1/profiles/avatar.json.jbuilder
new file mode 100644
index 000000000..0a4b4f9fa
--- /dev/null
+++ b/app/views/api/v1/profiles/avatar.json.jbuilder
@@ -0,0 +1 @@
+json.partial! 'api/v1/models/user', formats: [:json], resource: @user
diff --git a/spec/controllers/api/v1/profiles_controller_spec.rb b/spec/controllers/api/v1/profiles_controller_spec.rb
index 28b4c5ed5..50404ad55 100644
--- a/spec/controllers/api/v1/profiles_controller_spec.rb
+++ b/spec/controllers/api/v1/profiles_controller_spec.rb
@@ -180,6 +180,8 @@ RSpec.describe 'Profile API', type: :request do
as: :json
expect(response).to have_http_status(:success)
+ json_response = response.parsed_body
+ expect(json_response['avatar_url']).to be_empty
end
end
end