mirror of https://github.com/halo-dev/halo
Remove CUSTOM_STYLE properties
parent
8a15c7d770
commit
0feb4444b8
|
@ -4,7 +4,8 @@ package run.halo.app.model.properties;
|
|||
* Comment properties.
|
||||
*
|
||||
* @author johnniang
|
||||
* @date 4/1/19
|
||||
* @author ryanwang
|
||||
* @date 2019-04-01
|
||||
*/
|
||||
public enum CommentProperties implements PropertyEnum {
|
||||
|
||||
|
@ -22,9 +23,7 @@ public enum CommentProperties implements PropertyEnum {
|
|||
|
||||
PAGE_SIZE("comment_page_size", Integer.class, "10"),
|
||||
|
||||
CONTENT_PLACEHOLDER("comment_content_placeholder", String.class, ""),
|
||||
|
||||
CUSTOM_STYLE("comment_custom_style", String.class, "");
|
||||
CONTENT_PLACEHOLDER("comment_content_placeholder", String.class, "");
|
||||
|
||||
private final String value;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package run.halo.app.service.impl;
|
|||
import cn.hutool.core.lang.Validator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
@ -58,6 +59,8 @@ public class AdminServiceImpl implements AdminService {
|
|||
|
||||
private final StringCacheStore cacheStore;
|
||||
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
private final String driverClassName;
|
||||
|
||||
public AdminServiceImpl(PostService postService,
|
||||
|
@ -70,6 +73,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
UserService userService,
|
||||
LinkService linkService,
|
||||
StringCacheStore cacheStore,
|
||||
ApplicationEventPublisher eventPublisher,
|
||||
@Value("${spring.datasource.driver-class-name}") String driverClassName) {
|
||||
this.postService = postService;
|
||||
this.sheetService = sheetService;
|
||||
|
@ -81,6 +85,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
this.userService = userService;
|
||||
this.linkService = linkService;
|
||||
this.cacheStore = cacheStore;
|
||||
this.eventPublisher = eventPublisher;
|
||||
this.driverClassName = driverClassName;
|
||||
}
|
||||
|
||||
|
@ -112,7 +117,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
|
||||
if (SecurityContextHolder.getContext().isAuthenticated()) {
|
||||
// If the user has been logged in
|
||||
throw new BadRequestException("You have been logged in, do not log in repeatedly please");
|
||||
throw new BadRequestException("您已登录,请不要重复登录");
|
||||
}
|
||||
|
||||
// Generate new token
|
||||
|
@ -125,7 +130,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
|
||||
if (authentication == null) {
|
||||
throw new BadRequestException("You haven't logged in yet, so you can't log out");
|
||||
throw new BadRequestException("您尚未登录,因此无法注销");
|
||||
}
|
||||
|
||||
// Get current user
|
||||
|
|
|
@ -188,7 +188,7 @@ public class AttachmentServiceImpl extends AbstractCrudService<Attachment, Integ
|
|||
long pathCount = attachmentRepository.countByPath(attachment.getPath());
|
||||
|
||||
if (pathCount > 0) {
|
||||
throw new AlreadyExistsException("The attachment with path " + attachment.getPath() + " exists already");
|
||||
throw new AlreadyExistsException("附件路径为 " + attachment.getPath() + " 已经存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue