#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
为个人中心发布文章的操作添加重试机制,方式后端因为乐观锁出现异常错误。
#### Which issue(s) this PR fixes:
Fixes#6349
#### Does this PR introduce a user-facing change?
```release-note
为个人中心发布文章的操作添加重试机制,方式后端因为乐观锁出现异常错误。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
升级 tiptap 的相关依赖至 2.5.7。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
修改附件选择组件的默认显示数量,以解决因为图片数量过多或者图片过大导致的卡顿问题。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/6352
#### Does this PR introduce a user-facing change?
```release-note
修改附件选择组件的默认显示数量,以解决因为图片数量过多或者图片过大导致的卡顿问题。
```
#### What type of PR is this?
/kind feature
/area editor
#### What this PR does / why we need it:
支持在默认编辑器中使用 Tab 键实现首行缩进的功能。
当光标处于文本首行时,按下 Tab 键会触发首行缩进。
在首行缩进的情况下或者选中一段文本,再次按下 Tab 键会触发整段缩进。
#### How to test it?
测试文本块及区域标题块首行按下 Tab 键是否可以正常触发首行缩进
#### Which issue(s) this PR fixes:
Fixes#6316
#### Does this PR introduce a user-facing change?
```release-note
默认编辑器增加 Tab 快捷键首行缩进功能
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
在 https://github.com/halo-dev/halo/pull/6244 中移除了过时的 `QueryParamBuildUtil.buildParametersFromType` 方法,但是由于留给插件适配的时间不够,很多官方提供的插件也要和 2.18 一起发版这样会导致使用了此方法的插件无法启动,因此留下方法声明并输出日志等到后续版本在删除,这样可以给出一些时间给用户先升级插件而不是挂掉。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
Regenerate API docs and client to prevent unrelated changes from other PRs.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
通过将 ExtensionGetter Bean 共享到给插件的 ApplicationContext,插件能够方便地使用该 Bean 来获取扩展。此更改确保插件具有可靠的扩展访问方式,从而促进系统内更好的模块化和可扩展性。
#### Which issue(s) this PR fixes:
Fixes#6357
#### Does this PR introduce a user-facing change?
```release-note
将 ExtensionGetter Bean 共享给插件使用,以便插件可以通过它来获取扩展
```
#### What type of PR is this?
/kind bug
/area core
/area plugin
/milestone 2.18.x
#### What this PR does / why we need it:
This PR checks if the plugin is already unloaded while getting dependents to fix the problem that plugins without jar file may not be deleted or not be enabled or disabled.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6072
#### Special notes for your reviewer:
1. Try to move plugins folder to another folder
2. Restart Halo
3. Try to change state of plugins or delete plugins directly
4. See the result
#### Does this PR introduce a user-facing change?
```release-note
修复在没有插件文件的情况下可能无法删除插件的问题
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
使用组合输入时,按下回车键不再执行编辑器获取焦点的事件。
#### Which issue(s) this PR fixes:
Fixes#6345
#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器标题在使用组合输入时,按下回车键会导致其失去焦点的问题。
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
This PR checks readable of theme resources while getting resources to prevent Halo from throwing FileNotFoundException.
#### Which issue(s) this PR fixes:
Fixes#6338
#### Special notes for your reviewer:
1. Try to request <https://www.halo.run/themes/fake-theme/assets/favicons/favicon-32x32.png>
2. See the result
#### Does this PR introduce a user-facing change?
```release-note
修复访问不存在的主题资源时出现服务器异常的问题
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
This PR prevent remember-me token from updating after auto login.
#### Which issue(s) this PR fixes:
Fixes#6290
#### Does this PR introduce a user-facing change?
```release-note
修复“保持登录”可能失效的问题
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
更新预设插件版本。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
This PR fixes the problem of not being able to rebuild search index due to null description and updateTimestamp.
#### Which issue(s) this PR fixes:
Fixes#6317
#### Does this PR introduce a user-facing change?
```release-note
修复无法正常刷新搜索引擎的问题
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR adds devcontainer support for a better development experience.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
This PR simplifies RememberMeAuthenticationFilter by reusing AuthenticationWebFilter.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/area plugin
#### What this PR does / why we need it:
This PR adds `BeforeSecurityWebFilter` and `AfterSecurityWebFilter` extension points. See https://github.com/halo-sigs/plugin-page-cache/issues/4#issuecomment-2216677891 for more.
Now, we can do something before and after authenticating.
#### Does this PR introduce a user-facing change?
```release-note
添加认证授权的前置和后置处理器扩展点
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
在默认编辑器中,选中一个跨多个节点的 text 时,selection 会变为 RangeSelection,此时冒泡菜单将不会出现。
此 RP 将 RangeSelection 添加至 text 的冒泡菜单验证中,使得冒泡菜单可以出现。
#### How to test it?
测试跨行选中多个无序列表时,是否出现冒泡菜单。
#### Which issue(s) this PR fixes:
Fixes#6267
#### Does this PR introduce a user-facing change?
```release-note
修复默认编辑器中跨行选择节点时冒泡菜单无法出现的问题
```
#### What type of PR is this?
/milestone 2.18.x
#### What this PR does / why we need it:
将 BasePlugin 的 PluginWrapper 构造函数标记为过时并输出警告日志提示
#### Does this PR introduce a user-facing change?
```release-note
在 BasePlugin 的 PluginWrapper 构造函数输出过时警告日志以提醒开发者尽快适配
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
设备管理去除 IP 地址检查以避免频繁登录
#### Does this PR introduce a user-facing change?
```release-note
设备管理去除 IP 地址检查以避免频繁登录
```
#### What type of PR is this?
/kind improvement
/area core
/kind api-change
/milestone 2.18.x
#### What this PR does / why we need it:
This PR makes ConcurrencyFailureException respond http status code 409 instead of 500.
#### Which issue(s) this PR fixes:
Fixes#6254
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
为了平滑升级先保留 PluginWrapper 的 Bean
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/area plugin
#### What this PR does / why we need it:
This PR supports obtaining plugins root in plugins. Below is an example in plugin:
```java
@Component
class PluginsRootGetterDemo {
private final PluginsRootGetter pluginsRootGetter;
PluginsRootGetterDemo(PluginsRootGetter pluginsRootGetter) {
this.pluginsRootGetter = pluginsRootGetter;
}
}
```
Meanwhile, I remove the `PluginProperties#pluginsRoot` for a clear way to obtain plugins root.
#### Does this PR introduce a user-facing change?
```release-note
支持在插件中获取插件根目录
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
This PR treats `ui/build/dist` as resource dir for application module to adapt building and running using IntelliJ IDEA.
How to use?
1. Build ui project by executing command `./gradlew :ui:build -x :ui:check`.
1. Create a `Run/Debug Configuration` with arguments `--spring.profiles.active=dev --halo.console.proxy.enabled=false --halo.uc.proxy.enabled=false`.
1. Go to `Settings | Build, Execution, Deployment | Build Tools | Gradle` and select `IntelliJ IDEA` for `Build and run using:`
1. Run/Debug the configuration
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR bumps Halo version into 2.18.0 for next development iteration.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area plugin
/milestone 2.17.x
#### What this PR does / why we need it:
移除 BasePlugin 中已经过时的构造方法
在 2.6.1 版本中将 `BasePlugin(PluginWrapper wrapper)` 标记为过时并使用 `BasePlugin(PluginContext pluginContext)` 代替,现在已经过了很多版本,是时候移除它了。
see also #4023
#### Does this PR introduce a user-facing change?
```release-note
开发者相关:移除 BasePlugin 中已经过时的构造方法
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.18.x
#### What this PR does / why we need it:
移除 `QueryParamBuildUtil.buildParametersFromType` 方法使用手动构建代替,参考:
f5ebd9fe43/application/src/main/java/run/halo/app/content/PostQuery.java (L135)
#### Does this PR introduce a user-facing change?
```release-note
移除 `QueryParamBuildUtil.buildParametersFromType` 方法使用手动构建代替
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
None
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
/kind bug
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/6096
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
清理已经过时很久的 yaml extension 声明
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area plugin
/milestone 2.17.x
#### What this PR does / why we need it:
修复当插件入口文件的缓存目录被系统清理后会导致一直无法加载的问题
原问题复现步骤:
1. 登录后刷新页面,此时缓存目录被创建
2. 删除缓存目录后就会提示文件不存在然后导致插件入口文件一致无法加载直到重启 Halo
#### Which issue(s) this PR fixes:
Fixes#6226
#### Does this PR introduce a user-facing change?
```release-note
修复当插件入口文件的缓存目录被系统清理后会导致一直无法加载的问题
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.17.0
#### What this PR does / why we need it:
This PR provides a configuration property to control whether two-factor authentication is disabled. e.g.:
```yaml
halo:
security:
two-factor-auth:
disabled: true | false # Default is false.
```
#### Which issue(s) this PR fixes:
Fixes#5640
#### Special notes for your reviewer:
1. Enable 2FA and configure TOTP
2. Disable 2FA by configuring property above
3. Restart Halo and try to login
#### Does this PR introduce a user-facing change?
```release-note
支持通过配置的方式全局禁用二步验证
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
提供对模板中 halo footer 标签内容的扩展点以支持扩展页脚内容
#### Which issue(s) this PR fixes:
Fixes#6189
#### Does this PR introduce a user-facing change?
```release-note
提供对模板中 halo footer 标签内容的扩展点以支持扩展页脚内容
```
#### What type of PR is this?
/kind feature
/area core
/area theme
/milestone 2.17.x
#### What this PR does / why we need it:
支持在主题中检查已启动的插件是否符合指定的版本要求,以便可以在某些功能可以正常工作时才渲染
示例
```html
<p th:if="${pluginFinder.available('plugin-search-widget', '>=2.3.0')}>
<!-- do something -->
</p>
```
#### Does this PR introduce a user-facing change?
```release-note
支持在主题中检查已启动的插件是否符合指定的版本要求
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.17.0
#### What this PR does / why we need it:
This PR adds missed type to HaloDocument while converting.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6235
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/area plugin
/milestone 2.17.0
#### What this PR does / why we need it:
This PR creates a SearchService and makes it invokable for plugins.
#### Special notes for your reviewer:
1. Create a plugin
2. Publish all publication into Maven local repository by executing `./gradlew publishAllPublicationsToMavenLocalRepository`
3. Use `2.17.0-SNAPSHOT` as dependency version and refresh dependencies
4. Try to use the SearchService to search something.
#### Does this PR introduce a user-facing change?
```release-note
为插件提供全文搜索服务
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
优化插件扩展管理页面的 UI 权限,限制只有超级管理员才能访问。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
This PR add support for allowing plugin to listen the event that the plugin has started. Below is an example of listening the event in plugin:
```java
@EventListener
void onPluginStartedEvent(PluginStartedEvent event) {
// do something.
}
```
See https://github.com/halo-dev/halo/issues/5339#issuecomment-2199220068 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5339#issuecomment-2199220068
#### Special notes for your reviewer:
1. Create a plugin, add the listener above and write some logs
2. Build and install the plugin
3. Start plugin and see the logs you wrote
#### Does this PR introduce a user-facing change?
```release-note
支持在插件中监听已启动事件
```
#### What type of PR is this?
/area ui
/kind cleanup
#### What this PR does / why we need it:
重新生成 api client,移除无用的文件。并且此 PR 改进了生成的脚本,会在生成前删除旧的 api client 文件,保证不会遗留旧文件。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
由于2.17.0 修改了 listAll 的实现导致出现了不兼容 Sort 参数为 null 的情况,考虑到给开发者适应的时间因此先兼容并给出警告日志
see also #6219
#### Which issue(s) this PR fixes:
Fixes#6219
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
新增 LoginHandlerEnhancer 用于 Halo 扩展登录成功或失败后的处理逻辑如 RememberMe 和设备管理等
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
完善插件扩展设置页面:
1. 完善 i18n。
2. 将入口移动至插件页面右上角的操作按钮区域。
#### Does this PR introduce a user-facing change?
```release-note
None
```