mirror of https://github.com/halo-dev/halo
Change gavatar to gravatar.
parent
7cd58540b9
commit
38c30110d6
|
@ -55,7 +55,7 @@ public class OptionController {
|
|||
@ApiOperation("Options for comment")
|
||||
public Map<String, Object> comment() {
|
||||
List<String> keys = new ArrayList<>();
|
||||
keys.add("comment_gavatar_default");
|
||||
keys.add("comment_gravatar_default");
|
||||
keys.add("comment_content_placeholder");
|
||||
return optionService.listOptions(keys);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class BaseCommentDTO implements OutputConverter<BaseCommentDTO, BaseComme
|
|||
|
||||
private String authorUrl;
|
||||
|
||||
private String gavatarMd5;
|
||||
private String gravatarMd5;
|
||||
|
||||
private String content;
|
||||
|
||||
|
|
|
@ -50,10 +50,10 @@ public class BaseComment extends BaseEntity {
|
|||
private String authorUrl;
|
||||
|
||||
/**
|
||||
* Gavatar md5
|
||||
* Gravatar md5
|
||||
*/
|
||||
@Column(name = "gavatar_md5", columnDefinition = "varchar(128) default ''")
|
||||
private String gavatarMd5;
|
||||
@Column(name = "gravatar_md5", columnDefinition = "varchar(128) default ''")
|
||||
private String gravatarMd5;
|
||||
|
||||
/**
|
||||
* Comment content.
|
||||
|
@ -117,8 +117,8 @@ public class BaseComment extends BaseEntity {
|
|||
authorUrl = "";
|
||||
}
|
||||
|
||||
if (gavatarMd5 == null) {
|
||||
gavatarMd5 = "";
|
||||
if (gravatarMd5 == null) {
|
||||
gravatarMd5 = "";
|
||||
}
|
||||
|
||||
if (status == null) {
|
||||
|
|
|
@ -9,7 +9,7 @@ package run.halo.app.model.properties;
|
|||
*/
|
||||
public enum CommentProperties implements PropertyEnum {
|
||||
|
||||
GAVATAR_DEFAULT("comment_gavatar_default", String.class, "mm"),
|
||||
GRAVATAR_DEFAULT("comment_gravatar_default", String.class, "mm"),
|
||||
|
||||
NEW_NEED_CHECK("comment_new_need_check", Boolean.class, "true"),
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public interface UserService extends CrudService<User, Integer> {
|
|||
void setPassword(@NonNull User user, @NonNull String plainPassword);
|
||||
|
||||
/**
|
||||
* Set user default avatar,use Gavatar(http://cn.gravatar.com)
|
||||
* Set user default avatar,use Gravatar(http://cn.gravatar.com)
|
||||
*
|
||||
* @param user user must not be null
|
||||
*/
|
||||
|
|
|
@ -241,8 +241,8 @@ public abstract class BaseCommentServiceImpl<COMMENT extends BaseComment> extend
|
|||
comment.setUserAgent(ServletUtils.getHeaderIgnoreCase(HttpHeaders.USER_AGENT));
|
||||
}
|
||||
|
||||
if (comment.getGavatarMd5() == null) {
|
||||
comment.setGavatarMd5(DigestUtils.md5Hex(comment.getEmail()));
|
||||
if (comment.getGravatarMd5() == null) {
|
||||
comment.setGravatarMd5(DigestUtils.md5Hex(comment.getEmail()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(comment.getAuthorUrl())) {
|
||||
|
|
|
@ -346,7 +346,7 @@ public class RecoveryServiceImpl implements RecoveryService {
|
|||
baseComment.setEmail(commentMap.getOrDefault("commentAuthorEmail", "").toString());
|
||||
baseComment.setIpAddress(commentMap.getOrDefault("commentAuthorIp", "").toString());
|
||||
baseComment.setAuthorUrl(commentMap.getOrDefault("commentAuthorUrl", "").toString());
|
||||
baseComment.setGavatarMd5(commentMap.getOrDefault("commentAuthorAvatarMd5", "").toString());
|
||||
baseComment.setGravatarMd5(commentMap.getOrDefault("commentAuthorAvatarMd5", "").toString());
|
||||
baseComment.setContent(commentMap.getOrDefault("commentContent", "").toString());
|
||||
baseComment.setUserAgent(commentMap.getOrDefault("commentAgent", "").toString());
|
||||
baseComment.setIsAdmin(getBooleanOrDefault(commentMap.getOrDefault("isAdmin", "").toString(), false));
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-1079f749.94b473ad.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-161dc990.5ac5144c.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-5000e55c.7fb9bc61.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-81d936d8.05888d95.css rel=prefetch><link href=/css/chunk-b2d0b040.389eca76.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-bfd5bbcc.6a83ae7d.css rel=prefetch><link href=/css/chunk-c0a1d3c4.09186be6.css rel=prefetch><link href=/css/chunk-cec31564.6f053d75.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.11326d77.js rel=prefetch><link href=/js/chunk-0ba750a2.b786c9db.js rel=prefetch><link href=/js/chunk-1079f749.ec67c7db.js rel=prefetch><link href=/js/chunk-142c8832.0f8270b3.js rel=prefetch><link href=/js/chunk-14e0b302.a86d1254.js rel=prefetch><link href=/js/chunk-161dc990.5de9313f.js rel=prefetch><link href=/js/chunk-1be69b35.81559bfc.js rel=prefetch><link href=/js/chunk-2d0b64bf.61d5d7c3.js rel=prefetch><link href=/js/chunk-2d0d65a2.2249765a.js rel=prefetch><link href=/js/chunk-2d21a35c.eda7a11a.js rel=prefetch><link href=/js/chunk-2d228d13.85b46532.js rel=prefetch><link href=/js/chunk-31c8ea42.0b2feab9.js rel=prefetch><link href=/js/chunk-5000e55c.3bd9ce3a.js rel=prefetch><link href=/js/chunk-5bf599cc.ac9398f3.js rel=prefetch><link href=/js/chunk-6d8b31f6.b64e5366.js rel=prefetch><link href=/js/chunk-81d936d8.5c1d2539.js rel=prefetch><link href=/js/chunk-87e2df70.0ada7d4e.js rel=prefetch><link href=/js/chunk-b2d0b040.b0d70d07.js rel=prefetch><link href=/js/chunk-bb4f0d4a.048dc3a4.js rel=prefetch><link href=/js/chunk-bfd5bbcc.d2ca1e80.js rel=prefetch><link href=/js/chunk-c0a1d3c4.41d0d3f8.js rel=prefetch><link href=/js/chunk-cec31564.cfe3fd85.js rel=prefetch><link href=/js/fail.61f30b0f.js rel=prefetch><link href=/css/app.f8b02c30.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.845922f6.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.f8b02c30.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.845922f6.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-1079f749.94b473ad.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-161dc990.5ac5144c.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-5000e55c.7fb9bc61.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-81d936d8.05888d95.css rel=prefetch><link href=/css/chunk-b2d0b040.389eca76.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-bfd5bbcc.6a83ae7d.css rel=prefetch><link href=/css/chunk-c0a1d3c4.09186be6.css rel=prefetch><link href=/css/chunk-cec31564.6f053d75.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.11326d77.js rel=prefetch><link href=/js/chunk-0ba750a2.b786c9db.js rel=prefetch><link href=/js/chunk-1079f749.ec67c7db.js rel=prefetch><link href=/js/chunk-142c8832.0f8270b3.js rel=prefetch><link href=/js/chunk-14e0b302.a86d1254.js rel=prefetch><link href=/js/chunk-161dc990.5de9313f.js rel=prefetch><link href=/js/chunk-1be69b35.81559bfc.js rel=prefetch><link href=/js/chunk-2d0b64bf.61d5d7c3.js rel=prefetch><link href=/js/chunk-2d0d65a2.2249765a.js rel=prefetch><link href=/js/chunk-2d21a35c.eda7a11a.js rel=prefetch><link href=/js/chunk-2d228d13.85b46532.js rel=prefetch><link href=/js/chunk-31c8ea42.0b2feab9.js rel=prefetch><link href=/js/chunk-5000e55c.3bd9ce3a.js rel=prefetch><link href=/js/chunk-5bf599cc.6555f060.js rel=prefetch><link href=/js/chunk-6d8b31f6.b64e5366.js rel=prefetch><link href=/js/chunk-81d936d8.8bec77ac.js rel=prefetch><link href=/js/chunk-87e2df70.0ada7d4e.js rel=prefetch><link href=/js/chunk-b2d0b040.b0d70d07.js rel=prefetch><link href=/js/chunk-bb4f0d4a.ef7d1ded.js rel=prefetch><link href=/js/chunk-bfd5bbcc.d2ca1e80.js rel=prefetch><link href=/js/chunk-c0a1d3c4.41d0d3f8.js rel=prefetch><link href=/js/chunk-cec31564.cfe3fd85.js rel=prefetch><link href=/js/fail.61f30b0f.js rel=prefetch><link href=/css/app.852293da.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.29b04043.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.852293da.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.29b04043.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue