#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
The wrong `pre-commit` will prevent us from making a Git commit. The problem was caused by <https://github.com/halo-dev/halo/pull/5314>.
```bash
ui/.husky/pre-commit: line 4: cd: console: No such file or directory
husky - pre-commit hook exited with code 1 (error)
```
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
This PR creates AdditionalWebFilterChainProxy to call all additional filters instead of using SecurityWebFilterChain.
Please note that:
- the AdditionalWebFilterChainProxy should be executed before `org.springframework.security.web.server.WebFilterChainProxy`.
- I don't change `UsernamePasswordAuthenticator` because of <https://github.com/halo-dev/halo/pull/5348>. The authenticator should be in Security scope instead of a standalone webfilter.
See https://github.com/halo-dev/halo/issues/5300#issuecomment-1933436652 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5300
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
Prevent code contributors from being misled by outdated documentation(1.x).
#### Which issue(s) this PR fixes:
Fixes#5358
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
Correct some simplified Chinese characters that were not replaced in the yaml file of traditional Chinese.
#### Which issue(s) this PR fixes:
Fixes#3672
#### Special notes for your reviewer:
I have read the CONTRIBUTING file, but I'm not familiar with PR operations. If there's anything I can do to improve it, please let me know.
> By the way, the [contribution guidelines](https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md) provided in the PR template and README still use `master` as the main branch, which may cause some confusion for new contributors.
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
#### What type of PR is this?
/area ui
/kind cleanup
#### What this PR does / why we need it:
Rename console to ui in some files,
Ref https://github.com/halo-dev/halo/pull/5314
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
移除启动时不必要的搜索引擎索引构建步骤
#### Does this PR introduce a user-facing change?
```release-note
移除启动时不必要的搜索引擎索引构建步骤
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
修复启动时 GcSynchronizer 没有精准过滤出所需数据导致内存占用会出现较高峰值的问题
#### Which issue(s) this PR fixes:
Fixes#5324
#### Does this PR introduce a user-facing change?
```release-note
修复启动时 GcSynchronizer 没有精准过滤出所需数据导致内存占用会出现较高峰值的问题
```
#### What type of PR is this?
/kind bugfix
/milestone 2.12.x
/area core
#### What this PR does / why we need it:
修复事务未提交便触发控制器执行可能导致数据状态不正确的问题
**how to test it?**
1. 测试如 #5315 的问题是否还存在
2. 测试添加重名自定义模型对象会抛出异常且数据被回滚
#### Which issue(s) this PR fixes:
Fixes#5315
#### Does this PR introduce a user-facing change?
```release-note
修复事务未提交便触发控制器执行可能导致数据状态不正确的问题
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
This PR supports building Docker image with major version tag, e.g.: `halohub/halo:2`.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4976
#### 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 version to 2.13.0-SNAPSHOT and corrects links of Halo in README.md.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/area console
/milestone 2.12.x
#### What this PR does / why we need it:
为通知类型设置添加 UI 权限判断。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4728
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
为通知类型设置添加 UI 权限判断。
```
#### What type of PR is this?
/kind bug
/area editor
/area console
/milestone 2.12.x
#### What this PR does / why we need it:
在默认富文本编辑器解析文本时,使其保留空白符。
see https://prosemirror.net/docs/ref/#model.ParseOptions.preserveWhitespace
#### How to test it?
1. 输入一串文字,在其开始、结束、内容中分别键入空白字符。
2. 保存内容
3. 刷新页面,查看空白字符是否保留。
#### Which issue(s) this PR fixes:
Fixes#5260
#### Does this PR introduce a user-facing change?
```release-note
解决默认富文本编辑器内容刷新后空白字符丢失的问题
```
#### What type of PR is this?
/area console
/kind improvement
/milestone 2.12.x
#### What this PR does / why we need it:
修改 `@halo-dev/richtext-editor` 的版本号,为发布 Halo 2.12 做准备。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area console
/kind improvement
/milestone 2.12.x
#### What this PR does / why we need it:
重构 Console 仪表盘中小部件的数据获取方式。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area console
/kind bug
/milestone 2.12.x
#### What this PR does / why we need it:
修复创建角色时,勾选某个角色模板导致已选角色模板被清空的问题。
#### Which issue(s) this PR fixes:
Fixes#5275
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.12.x
#### What this PR does / why we need it:
优化启动时用户头像获取不到的错误提示
原因是在启动时用户被执行 reconcile 时使用的 plugin-s3 插件还没有启动所以无法获取到 permalink 需要重试
how to test it?
使用 plugin-s3 插件作为用户头像的存储策略然后上传头像测试此 PR 在启动时的异常提示是否输出为:
```
2024-01-29T11:53:13.674+08:00 WARN 31937 --- [rReconciler-t-1] r.h.a.c.e.reconciler.UserReconciler : Failed to get avatar permalink for user [guqing] with attachment [460be0c4-b09f-4b25-ad93-e45f30331ec7], re-enqueuing...
```
#### Which issue(s) this PR fixes:
Fixes#5268
#### Does this PR introduce a user-facing change?
```release-note
优化启动时用户头像获取不到的错误提示
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.12.x
#### What this PR does / why we need it:
为个人中心的文章适配自动保存功能
#### How to test it?
新建一个空白文章,测试当失去焦点、切换路由,或者在页面等待 20S 后,是否会自动创建文章草稿。
#### Which issue(s) this PR fixes:
Fixes#5036
#### Does this PR introduce a user-facing change?
```release-note
为个人中心的文章适配自动保存功能
```
#### What type of PR is this?
/area console
/kind bug
/milestone 2.12.x
#### What this PR does / why we need it:
修复创建 PAT 之后,点击复制按钮无法复制 token 的问题。
#### Which issue(s) this PR fixes:
Fixes#5273
#### Special notes for your reviewer:
测试步骤:
1. 构建生产环境的 UC。
2. 创建 PAT,点击复制按钮,观察是否能够正常复制。
#### Does this PR introduce a user-facing change?
```release-note
修复创建 PAT 之后,点击复制按钮无法复制 token 的问题。
```
#### What type of PR is this?
/area console
/kind bug
/milestone 2.12.x
#### What this PR does / why we need it:
修复当头像因为后端服务无法正常变更时,前端因为一直处于 refetch 状态导致无法重新上传的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4852
#### Special notes for your reviewer:
1. 使用 https://github.com/AirboZH/plugin-uposs 存储服务创建一个存储策略。
2. 用户设置中的头像存储位置改为此存储策略。
3. 上传头像,观测是否一直处于重新获取的状态。
#### Does this PR introduce a user-facing change?
```release-note
优化头像上传,防止因为后端服务异常导致无法重新上传。
```
#### What type of PR is this?
/area console
/kind bug
/milestone 2.12.x
#### What this PR does / why we need it:
修复当浏览器标签页不活跃时,文章编辑页面的 health 接口没有定时请求的问题。
#### Which issue(s) this PR fixes:
Fixes#5265
#### Special notes for your reviewer:
测试方式:
1. 可以在本地先将 refetchInterval 改为 1000 以方便测试。
2. 进入文章编辑页面。
3. 切换至其他标签页。
4. 返回之后查看浏览器开发者工具的 Network ,观察 health 接口是否有请求。
#### Does this PR introduce a user-facing change?
```release-note
修复当浏览器标签页不活跃时,文章编辑页面的 health 接口没有定时请求的问题。
```
#### What type of PR is this?
/kind bug
/area core
/area plugin
/milestone 2.12.0
#### What this PR does / why we need it:
This PR adjusts the order of starting reconcilers in plugin, or it will be stuck in starting synchronizer and no reconcilers will be executed.
The problem may be introduced by <https://github.com/halo-dev/halo/pull/5251>.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR upgrades Resilience4J to 2.2.0. See https://github.com/resilience4j/resilience4j/blob/v2.2.0/RELEASENOTES.adoc for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Resilience4j 至 2.2.0
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR upgrades Lucene to 9.9.1. See https://lucene.apache.org/core/corenews.html#apache-lucenetm-991-available for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Lucene 至 9.9.1
```
#### What type of PR is this?
/area console
/kind improvement
/milestone 2.12.x
#### 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 improvement
/area core
/area plugin
/milestone 2.12.x
#### What this PR does / why we need it:
This PR mainly simplifies halo plugin manager. Before this,
- we have too many repeat code from super class, which is uncessary
- we maintain plugin application context in ExtensionComponentsFinder, which is uncessary and is hard to manage
- we fire halo plugin event in halo plugin manager, which is complicated and leads to too many repeat code
This PR does:
- refactor halo plugin manager
- wrap base plugin with spring plugin which contains application context
- remove ExtensionComponentsFinder
- bridge halo plugin event and spring plugin event
- wait extensions fully deleted when stopping
Meanwhile, this PR will supersede PR <https://github.com/halo-dev/halo/pull/5236>.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5226
#### Special notes for your reviewer:
Test installing, enabing, disabling, upgrading, reloading and deleting plugins.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.12.x
/area core
#### What this PR does / why we need it:
我们为文章自定义模型的数据调协过程引入了重要的优化。
在以前,当数据量大(例如,50,000篇文章)的情况下,每次系统重启都会触发耗时且资源密集的所有数据的协调过程,即使大部分数据并不需要调协。这导致了不必要的数据库查询和高资源消耗。
为了解决这个问题,我们在文章自定义模型的 status 中添加了一个新的 `Long observedVersion` 属性。
每次协调后,此属性将更新为 `metadata.version`,还调整了 `syncAllOnStart` 条件,只有当 `status.observedVersion < metadata.version` 时才会调协数据。
这个改变确保了只有在启动时需要的数据会被协调,从而减少了资源使用和不必要的协调过程。
因此,Halo 的数据承载能力得到了显著提高。
**how to test it?**
使用此 PR 测试:启动时文章只有首次会执行 reconcile,再次重启时则不会再执行,如果直接修改数据去除掉 `status.observedVersion` 来模拟迁移或漏 reconcile 的过程则启动时该数据会被再次执行 reconcile
#### Which issue(s) this PR fixes:
Fixes#5147
#### Does this PR introduce a user-facing change?
```release-note
优化文章数据的调协过程以降低 Halo 启动时文章的调协耗时同时提高性能和资源利用率
```
#### What type of PR is this?
/kind feature
/area core
/area console
/milestone 2.12.x
#### What this PR does / why we need it:
使用索引功能来查询文章列表
how to test it?
1. 测试文章列表的筛选条件是否正确
2. 测试文章列表中关联的标签和分类信息是否正确
3. 测试仪表盘的文章数量统计是否正确
4. 测试分类关联文章的数量是否正确
5. 测试标签关联文章的文章是否正确
6. 测试主题端文章列表是否正确
#### Which issue(s) this PR fixes:
Fixes#5223
#### Does this PR introduce a user-facing change?
```release-note
使用高级索引功能检索文章以显著降低资源消耗并提供更快、更高效的文章检索体验
```
#### What type of PR is this?
/kind bug
/area console
/area editor
#### What this PR does / why we need it:
将默认编辑器的父级容器移除。用于解决冒泡菜单被遮挡的问题。
由于修改后默认编辑器自身可滚动,因此可以使默认编辑器容器内的绝对定位元素获取到当前滚动的位置。
#### How to test it?
输入超过一屏宽度的内容,按 `MOD + A` 全选,查看冒泡菜单是否被顶部菜单遮挡。
#### Which issue(s) this PR fixes:
Fixes#4869
#### Does this PR introduce a user-facing change?
```release-note
解决冒泡菜单会被顶部工具栏遮挡的问题
```