[Backport] configurable gravatar functionality

stable
Juanfran 2016-10-10 08:52:50 +02:00
parent d114f5b397
commit 20fc32400a
2 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@
###
class AvatarService
constructor: () ->
constructor: (@config) ->
IMAGES = [
"/#{window._version}/images/user-avatars/user-avatar-01.png"
"/#{window._version}/images/user-avatars/user-avatar-02.png"
@ -71,7 +71,7 @@ class AvatarService
return {
url: photo
}
else if location.host.indexOf('localhost') != -1
else if location.host.indexOf('localhost') != -1 || !@config.get("gravatar", true)
root = location.protocol + '//' + location.host
logo = @.getDefault(gravatar)
@ -90,4 +90,4 @@ class AvatarService
bg: logo.color
}
angular.module("taigaCommon").service("tgAvatarService", AvatarService)
angular.module("taigaCommon").service("tgAvatarService", ["$tgConfig", AvatarService])

View File

@ -15,5 +15,6 @@
"termsOfServiceUrl": null,
"maxUploadFileSize": null,
"contribPlugins": [],
"tribeHost": null
"tribeHost": null,
"gravatar": true
}