Commit Graph

5552 Commits (033764ea631e7ce88fb2323dadb84f673cda03b9)

Author SHA1 Message Date
John Niang 033764ea63
Migrate maven publish with publishing by using the Portal Publisher API 2025-05-29 11:44:26 +08:00
John Niang 981d6d1c4a
Merge pull request #7476 from halo-dev/chore/upgrade-to-lucene-10.2.1
Bump Lucene to 10.2.1
2025-05-26 23:04:00 +08:00
John Niang d18f37df0a
Bump Lucene to 10.2.1 2025-05-26 22:44:51 +08:00
Ryan Wang 6410867302
feat: improve i18n for editor project (#7473)
#### What type of PR is this?

/kind improvement
/area editor
/milestone 2.21.x

#### What this PR does / why we need it:

Improve English translations for the editor. The changes in https://github.com/halo-dev/halo/pull/7444 did not provide English translations.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-26 14:40:18 +00:00
John Niang 281a36fbe9
Merge pull request #7469 from halo-dev/chore/remove-deprecated-code
Remove deprecated code
2025-05-26 22:35:25 +08:00
Ryan Wang f36531119a Update ui
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-26 22:09:34 +08:00
Ryan Wang c27cbb5204
Merge branch 'main' into chore/remove-deprecated-code 2025-05-26 21:15:25 +08:00
John Niang d706b5eb6c
Add support back for using relative permalink (#7475)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR fixes the problem of not working for relative permalink caused by <https://github.com/halo-dev/halo/pull/7459>.

#### Special notes for your reviewer:

1. Try to start Halo instance with `halo.use-absolute-permalink=false` and check the permalinks of posts and attachments.
1. Try to start Halo instance with `halo.use-absolute-permalink=true` and check the permalinks of posts and attachments.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-26 10:12:18 +00:00
Nimbus3009 a0dc9590c2
Add support for customizing nofollow of links in editor (#7444)
#### What type of PR is this?

/kind improvement
/area ui
/area editor

#### What this PR does / why we need it:

![屏幕截图 2025-05-19 101940](https://github.com/user-attachments/assets/bad2c616-7445-452e-b1bd-c8220f94a8bc)

#### Which issue(s) this PR fixes:

Fixes #6950

```release-note
增加可以勾选 nofollow 的设定
```
2025-05-26 09:16:39 +00:00
John Niang e346b979f0
Regenerate api client 2025-05-26 16:45:16 +08:00
John Niang e9b8b2f796
Regenerate OpenAPI 2025-05-26 16:38:00 +08:00
John Niang 301bbfb7c9
Remove deprecated code 2025-05-26 15:38:03 +08:00
John Niang ccdb97743b
Refactor logout handler (#7470)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR corrects location of LogoutHandler instead of in LogoutSuccessHandler. LogoutHanadler should be invoked before LogoutSuccessHandler.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-26 03:44:14 +00:00
柳意梧情 5c27a0484b
Add shared events for listening user login and logout in plugins (#7440)
#### What type of PR is this?
/kind improvement

#### What this PR does / why we need it:

This PR adds UserLoginEvent and UserLogoutEvent which are shared to plugins.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/7436

#### Does this PR introduce a user-facing change?

```release-note
添加用户登录/登出事件
```
2025-05-23 08:54:12 +00:00
Ryan Wang a1c48b4943
fix: resolve text wrapping issue in StatusDot component (#7466)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.21.x


#### What this PR does / why we need it:

before:

<img width="273" alt="image" src="https://github.com/user-attachments/assets/e1e21e33-6ead-4d47-b3f6-1b19fb0a8a96" />

after:

<img width="323" alt="image" src="https://github.com/user-attachments/assets/950023f8-6e71-4db4-97c4-9a3b2be6dffb" />


#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-23 08:14:12 +00:00
John Niang 3df117511c
Remove deprecation warnings from Gradle (#7468) 2025-05-23 16:08:38 +08:00
John Niang fb2fc31cdd
Bump Spring Boot to 3.5.0 (#7467)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR bumps Spring Boot to [3.5.0](https://github.com/spring-projects/spring-boot/releases/tag/v3.5.0).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.5.0
```
2025-05-23 04:22:12 +00:00
John Niang fb6b6f632d
Add support for configuring external URL online (#7459)
* Add support for configuring external URL online

* Fix the problem of timeout on external URL initialization

* Add external URL editing capability to overview page

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Ryan Wang <i@ryanc.cc>
2025-05-22 15:23:43 +08:00
Ryan Wang 42c374dba5 Add external URL editing capability to overview page
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-22 14:56:57 +08:00
John Niang 254bb9b225
Fix the problem of timeout on external URL initialization 2025-05-22 13:38:05 +08:00
John Niang 2d4e3b2c54
Fix the problem of undetermined locale (#7458)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR check if the locale is undetermined during resolving locale. Or it will cause the error below if locale is `und`:

```java
2025-05-21T17:28:45.953+08:00 ERROR 58760 --- [undedElastic-14] o.s.w.s.adapter.HttpWebHandlerAdapter    : [c1824fa5-1] 500 Server Error for HTTP GET "/"

org.thymeleaf.exceptions.TemplateOutputException: An error happened during template rendering
	at org.thymeleaf.engine.OutputTemplateHandler.handleText(OutputTemplateHandler.java:75) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.AbstractTemplateHandler.handleText(AbstractTemplateHandler.java:221) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleText(ProcessorTemplateHandler.java:587) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.Text.beHandled(Text.java:97) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:300) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.GatheringModelProcessable.process(GatheringModelProcessable.java:78) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.queueProcessable(ProcessorTemplateHandler.java:2106) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1642) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.CloseElementTag.beHandled(CloseElementTag.java:139) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:300) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.OpenElementTagModelProcessable.process(OpenElementTagModelProcessable.java:110) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.queueProcessable(ProcessorTemplateHandler.java:2106) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1559) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:155) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ThrottledTemplateProcessor.process(ThrottledTemplateProcessor.java:235) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ThrottledTemplateProcessor.process(ThrottledTemplateProcessor.java:200) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.spring6.SpringWebFluxTemplateEngine$StreamThrottledTemplateProcessor.process(SpringWebFluxTemplateEngine.java:720) ~[thymeleaf-spring6-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.spring6.SpringWebFluxTemplateEngine.lambda$createChunkedStream$2(SpringWebFluxTemplateEngine.java:269) ~[thymeleaf-spring6-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at reactor.core.publisher.FluxGenerate$GenerateSubscription.slowPath(FluxGenerate.java:271) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxGenerate$GenerateSubscription.request(FluxGenerate.java:213) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.request(FluxPeekFuseable.java:144) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.requestUpstream(FluxSubscribeOn.java:131) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onSubscribe(FluxSubscribeOn.java:124) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onSubscribe(FluxPeekFuseable.java:178) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxGenerate.subscribe(FluxGenerate.java:85) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:68) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) ~[reactor-core-3.7.5.jar:3.7.5]
	at reactor.core.scheduler.BoundedElasticThreadPerTaskScheduler$SchedulerTask.run(BoundedElasticThreadPerTaskScheduler.java:1013) ~[reactor-core-3.7.5.jar:3.7.5]
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329) ~[na:na]
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Locale "" cannot be used as it does not specify a language. (template: "modules/layout" - line 12, col 49)
	at org.thymeleaf.messageresolver.StandardMessageResolutionUtils.computeMessageResourceNamesFromBase(StandardMessageResolutionUtils.java:202) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.messageresolver.StandardMessageResolutionUtils.resolveMessagesForTemplate(StandardMessageResolutionUtils.java:69) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.messageresolver.StandardMessageResolver.resolveMessagesForTemplate(StandardMessageResolver.java:380) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.messageresolver.StandardMessageResolver.resolveMessage(StandardMessageResolver.java:282) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.messageresolver.StandardMessageResolver.resolveMessage(StandardMessageResolver.java:227) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.context.AbstractEngineContext.getMessage(AbstractEngineContext.java:134) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.standard.expression.MessageExpression.executeMessageExpression(MessageExpression.java:265) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:69) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.standard.processor.StandardUtextTagProcessor.doProcess(StandardUtextTagProcessor.java:87) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:136) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.TemplateManager.process(TemplateManager.java:519) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.util.LazyProcessingCharSequence.writeUnresolved(LazyProcessingCharSequence.java:85) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.util.AbstractLazyCharSequence.write(AbstractLazyCharSequence.java:103) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.AbstractTextualTemplateEvent.writeContent(AbstractTextualTemplateEvent.java:224) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.Text.write(Text.java:78) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	at org.thymeleaf.engine.OutputTemplateHandler.handleText(OutputTemplateHandler.java:71) ~[thymeleaf-3.1.3.RELEASE.jar:3.1.3.RELEASE]
	... 29 common frames omitted
```

#### Does this PR introduce a user-facing change?

```release-note
修复因 Locale 解析错误导致无法访问页面的问题
```
2025-05-22 03:14:00 +00:00
John Niang 79a4386c82
Make uploads resources protected (#7456)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR removes `/uploads/**` from static resources to make it protected by Halo security.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-22 03:03:59 +00:00
John Niang e9011eb3ec
Add support for configuring external URL online 2025-05-22 00:00:55 +08:00
Ryan Wang b309bc532b
refactor: improve entity component layout for better device responsiveness (#7383)
* refactor: improve entity component layout for better device responsiveness

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Resolve CSS style conflicts

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update missing translaions

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-21 11:29:41 +08:00
John Niang d09f694336
Merge pull request #7455 from JohnNiang/chore/upgrade-json-assert
Upgrade JSONAssert to 2.0-rc1
2025-05-21 11:26:23 +08:00
John Niang c73f0ddeee
Upgrade JSONAssert to 2.0-rc1 2025-05-21 10:37:04 +08:00
John Niang f18cf18862
Merge pull request #7449 from JohnNiang/refactor/libs-versions
Refactor dependencies and plugins with version catelog
2025-05-20 10:45:35 +08:00
Ryan Wang d382b45236
Merge branch 'main' into refactor/libs-versions 2025-05-20 10:07:25 +08:00
John Niang ba99692174
Upgrade to Gradle 8.14 (#7450) 2025-05-20 10:06:23 +08:00
John Niang 0c4be85467
Set Java 21 as minimal version (#7451)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR sets Java 21 as minimal version. After doing that, Halo can only run on Java 21 or newer version.

Fortunately, all plugins and themes won't be affected by the restriction.

> https://docs.gradle.org/current/userguide/toolchains.html#sec:release-flag-toolchain

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/6867

#### Does this PR introduce a user-facing change?

```release-note
[Action Required] 更新最低运行环境为 Java 21
```
2025-05-20 02:05:25 +00:00
John Niang 1520188aac
Merge pull request #7441 from liuyiwuqing/added-search-for-users-by-email
Add support for querying users by email
2025-05-20 00:24:17 +08:00
John Niang d64f01d0d5
Fix unit test due to dependency update 2025-05-19 18:04:02 +08:00
John Niang 0dd1e13e82
Fix the problem of not resolving git properties
See https://github.com/n0mer/gradle-git-properties/issues/242 for more
2025-05-19 17:42:40 +08:00
John Niang d099acfffa
Update dependencies 2025-05-19 16:15:08 +08:00
John Niang e6f753bb5d
Refactor dependencies and plugins with version catelog 2025-05-19 16:05:56 +08:00
John Niang 7eadf7a889
Refactor processResources with creating a new copy task (#7446)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

Defining `into` property in `processResources` task is not working, so I create a new copy task to process UI dist.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-19 04:35:41 +00:00
John Niang 44cae84bc7
Bump versions to 2.21.0-SNAPSHOT (#7448)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.21.x

#### What this PR does / why we need it:

This PR bumps versions to 2.21.0-SNAPSHOT, including ui packages and API client.

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-19 04:33:40 +00:00
liuyiwuqing b4a00f457a feat(user): 增加通过邮箱搜索用户功能 2025-05-16 19:50:34 +08:00
John Niang 2ca731f10a
Merge pull request #7434 from ruibaby/chore/bump-packages
chore: bump ui packages version
2025-05-15 13:42:22 +08:00
Ryan Wang 04c27db24e chore: bump ui packages version
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-15 12:07:19 +08:00
John Niang 3148fc3e31
Merge pull request #7429 from JohnNiang/refactor/improve-failure-message-of-plugin
Show stack trace while failing to start plugin
2025-05-15 12:03:49 +08:00
John Niang 88ef2c92e1
Merge pull request #7430 from JohnNiang/bug/cannot-access-post-page-with-specific-pattern
Remove wrong cache of pattern matchers
2025-05-15 11:11:42 +08:00
Ryan Wang 24d3324488 Refine UI
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-15 11:06:06 +08:00
Ryan Wang a733b6f562
Merge branch 'main' into refactor/improve-failure-message-of-plugin 2025-05-15 10:33:07 +08:00
mwwcdk 3a9e5d2010
Fix the deprecation warning of support for convention-base @Component names (#7433)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

过期的Spring @Component API

#### Which issue(s) this PR fixes:

Fixes #7431

#### Does this PR introduce a user-facing change?

```release-note
None
```
2025-05-14 16:38:36 +00:00
John Niang b4ac91df20
Remove wrong cache of pattern matchers 2025-05-14 16:49:11 +08:00
Ryan Wang 6cc7cf6d22
refactor: improve drag-and-drop sorting feature for categories (#7424)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-14 15:20:21 +08:00
John Niang b2848a683a
Show stack trace while failing to start plugin 2025-05-14 14:26:43 +08:00
Ryan Wang 18105cbe44
refactor: improve drag-and-drop sorting feature for menu items (#7423)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-14 10:16:21 +08:00
Ryan Wang 796407c67d
refactor: improve type definitions for editor extension (#7425)
#### What type of PR is this?

/area plugin
/area editor
/milestone 2.20.x

#### What this PR does / why we need it:

Previously, editor extension related types were not exported because the type names conflicted with some UI component names, making it impossible to import extension types in plugins. This PR modifies the type names and exports them in index.ts.

#### Does this PR introduce a user-facing change?

```release-note
导出与编辑器扩展相关的类型定义
```
2025-05-13 09:56:06 +00:00