Work in progress, keeping avatars locally
This introduces a new model to store the avatars and 3 uploads per user (gravatar, system and custom) user can then pick which they want.
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
export default Discourse.Controller.extend(Discourse.ModalFunctionality, {
|
||||
|
||||
actions: {
|
||||
useUploadedAvatar: function() { this.set("use_uploaded_avatar", true); },
|
||||
useGravatar: function() { this.set("use_uploaded_avatar", false); }
|
||||
},
|
||||
|
||||
avatarTemplate: function() {
|
||||
return this.get("use_uploaded_avatar") ? this.get("uploaded_avatar_template") : this.get("gravatar_template");
|
||||
}.property("use_uploaded_avatar", "uploaded_avatar_template", "gravatar_template")
|
||||
|
||||
useUploadedAvatar: function() {
|
||||
this.set("selected", "uploaded");
|
||||
},
|
||||
useGravatar: function() {
|
||||
this.set("selected", "gravatar");
|
||||
},
|
||||
useSystem: function() {
|
||||
this.set("selected", "system");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user