mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: User can't save gravatar as profile picture after refresh.
https://meta.discourse.org/t/gravatar-issue-cant-save-changes/95076
This commit is contained in:
@@ -61,7 +61,11 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||
this.set("gravatarFailed", true);
|
||||
} else {
|
||||
this.set("gravatarFailed", false);
|
||||
this.get("user").setProperties(result);
|
||||
|
||||
this.get("user").setProperties({
|
||||
gravatar_avatar_upload_id: result.gravatar_upload_id,
|
||||
gravatar_avatar_template: result.gravatar_avatar_template
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => this.set("gravatarRefreshDisabled", false));
|
||||
|
||||
@@ -15,7 +15,13 @@
|
||||
<div class="avatar-choice">
|
||||
{{radio-button id="gravatar" name="avatar" value="gravatar" selection=selected}}
|
||||
<label class="radio" for="gravatar">{{bound-avatar-template user.gravatar_avatar_template "large"}} {{{i18n 'user.change_avatar.gravatar'}}} {{user.email}}</label>
|
||||
{{d-button action="refreshGravatar" title="user.change_avatar.refresh_gravatar_title" disabled=gravatarRefreshDisabled icon="refresh"}}
|
||||
|
||||
{{d-button action="refreshGravatar"
|
||||
title="user.change_avatar.refresh_gravatar_title"
|
||||
disabled=gravatarRefreshDisabled
|
||||
icon="refresh"
|
||||
class="avatar-selector-refresh-gravatar"}}
|
||||
|
||||
{{#if gravatarFailed}}
|
||||
<p class="error">{{I18n 'user.change_avatar.gravatar_failed'}}</p>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user