mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
Use retro as default Gravator image
This commit is contained in:
@@ -17,7 +17,7 @@ trait AvatarImageProvider { self: RequestCache =>
|
|||||||
// by user name
|
// by user name
|
||||||
getAccountByUserName(userName).map { account =>
|
getAccountByUserName(userName).map { account =>
|
||||||
if(account.image.isEmpty && context.settings.gravatar){
|
if(account.image.isEmpty && context.settings.gravatar){
|
||||||
s"""https://www.gravatar.com/avatar/${StringUtil.md5(account.mailAddress.toLowerCase)}?s=${size}"""
|
s"""https://www.gravatar.com/avatar/${StringUtil.md5(account.mailAddress.toLowerCase)}?s=${size}&d=retro&r=g"""
|
||||||
} else {
|
} else {
|
||||||
s"""${context.path}/${account.userName}/_avatar"""
|
s"""${context.path}/${account.userName}/_avatar"""
|
||||||
}
|
}
|
||||||
@@ -28,13 +28,13 @@ trait AvatarImageProvider { self: RequestCache =>
|
|||||||
// by mail address
|
// by mail address
|
||||||
getAccountByMailAddress(mailAddress).map { account =>
|
getAccountByMailAddress(mailAddress).map { account =>
|
||||||
if(account.image.isEmpty && context.settings.gravatar){
|
if(account.image.isEmpty && context.settings.gravatar){
|
||||||
s"""https://www.gravatar.com/avatar/${StringUtil.md5(account.mailAddress.toLowerCase)}?s=${size}"""
|
s"""https://www.gravatar.com/avatar/${StringUtil.md5(account.mailAddress.toLowerCase)}?s=${size}&d=retro&r=g"""
|
||||||
} else {
|
} else {
|
||||||
s"""${context.path}/${account.userName}/_avatar"""
|
s"""${context.path}/${account.userName}/_avatar"""
|
||||||
}
|
}
|
||||||
} getOrElse {
|
} getOrElse {
|
||||||
if(context.settings.gravatar){
|
if(context.settings.gravatar){
|
||||||
s"""https://www.gravatar.com/avatar/${StringUtil.md5(mailAddress.toLowerCase)}?s=${size}"""
|
s"""https://www.gravatar.com/avatar/${StringUtil.md5(mailAddress.toLowerCase)}?s=${size}&d=retro&r=g"""
|
||||||
} else {
|
} else {
|
||||||
s"""${context.path}/_unknown/_avatar"""
|
s"""${context.path}/_unknown/_avatar"""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user