generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce9ecfc
commit e82e467
Showing
12 changed files
with
277 additions
and
41 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/main/java/xin/wenjing/blogHao/controller/BlogHaoConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package xin.wenjing.blogHao.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.pf4j.PluginWrapper; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import reactor.core.publisher.Mono; | ||
import run.halo.app.plugin.ApiVersion; | ||
import run.halo.app.plugin.ReactiveSettingFetcher; | ||
import xin.wenjing.blogHao.entity.Settings; | ||
|
||
/** | ||
* 相关配置信息获取 | ||
* @author: dreamChaser | ||
* @date: 2024年06月23日 10:46 | ||
*/ | ||
@RequiredArgsConstructor | ||
@ApiVersion("blogHao.wenjing.xin/v1alpha1") | ||
@RequestMapping("/blogHaoConfig") | ||
@RestController | ||
public class BlogHaoConfig { | ||
|
||
private final ReactiveSettingFetcher reactiveSettingFetcher; | ||
|
||
private final PluginWrapper pluginWrapper; | ||
|
||
@GetMapping("/slide-config") | ||
public Mono<Settings.SlideConfig> queryBaseConfigMsg() { | ||
Mono<Settings.SlideConfig> slideConfigMono = | ||
reactiveSettingFetcher.fetch(Settings.SlideConfig.GROUP_NAME, Settings.SlideConfig.class) | ||
.defaultIfEmpty(new Settings.SlideConfig()) | ||
.map(item -> item); | ||
return slideConfigMono; | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
|
||
/** | ||
* 功能描述 | ||
* | ||
* @author: dreamChaser | ||
* @date: 2024年06月16日 19:50 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1alpha1 | ||
kind: Role | ||
metadata: | ||
name: role-template-blog-hao | ||
labels: | ||
halo.run/role-template: "true" | ||
#将配置查看的权限给所有用户 | ||
rbac.authorization.halo.run/aggregate-to-anonymous: "true" | ||
annotations: | ||
rbac.authorization.halo.run/module: "BlogHao View" | ||
rbac.authorization.halo.run/display-name: "配置查看" | ||
rules: | ||
- apiGroups: [ "blogHao.wenjing.xin" ] | ||
resources: [ "blogHaoConfig" ] | ||
verbs: [ "get", "list"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
height: 100px !important; | ||
border-radius: 8px; | ||
} | ||
|
||
#bloghao-img-thumb{ | ||
margin-bottom: -15px; | ||
} | ||
|
Oops, something went wrong.