|
|
|
|
@ -38,11 +38,17 @@ Template.avatarPrompt.helpers |
|
|
|
|
Template.avatarPrompt.events |
|
|
|
|
'click .select-service': -> |
|
|
|
|
if @service is 'initials' |
|
|
|
|
Meteor.call 'resetAvatar' |
|
|
|
|
toastr.success t('Avatar_changed_successfully') |
|
|
|
|
Meteor.call 'resetAvatar', (err) -> |
|
|
|
|
if err?.details?.timeToReset? |
|
|
|
|
toastr.error t('Error_too_many_requests', parseInt(err.details.timeToReset / 1000)) |
|
|
|
|
else |
|
|
|
|
toastr.success t('Avatar_changed_successfully') |
|
|
|
|
else |
|
|
|
|
Meteor.call 'setAvatarFromService', @blob, @contentType, @service, -> |
|
|
|
|
toastr.success t('Avatar_changed_successfully') |
|
|
|
|
Meteor.call 'setAvatarFromService', @blob, @contentType, @service, (err) -> |
|
|
|
|
if err?.details?.timeToReset? |
|
|
|
|
toastr.error t('Error_too_many_requests', parseInt(err.details.timeToReset / 1000)) |
|
|
|
|
else |
|
|
|
|
toastr.success t('Avatar_changed_successfully') |
|
|
|
|
|
|
|
|
|
'click .login-with-service': (event, template) -> |
|
|
|
|
loginWithService = "loginWith#{_.capitalize(this)}" |
|
|
|
|
|