#### What type of PR is this?
/area console
/kind feature
/milestone 2.11.x
#### What this PR does / why we need it:
Add email field for signup
<img width="832" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/dabc7411-a18d-4a8b-a0be-f875b16ba58f">
#### Does this PR introduce a user-facing change?
```release-note
用户注册新增电子邮箱字段。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
Respond HTTP status CREATED for system initialization API instead of string `true`.
#### Which issue(s) this PR fixes:
Fixes#4885
#### Does this PR introduce a user-facing change?
```release-note
None
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/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?
/kind bug
<!--
添加其中一个类别:
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:
在加入索引前判断文章的可见性。只将PUBLIC文章加入索引,修复手动刷新搜索索引会将私有文章加入索引的问题
#### Which issue(s) this PR fixes:
Fix#4879
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
#### Special notes for your reviewer:
null
#### 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
修复手动刷新搜索索引会将私有文章加入索引的问题
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.11.x
#### What this PR does / why we need it:
修复在 Windows 平台下无法正常启动 Console 服务以及无法正常编译的问题。
<img width="1124" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/55edd00a-8e71-437e-8889-0fe4a43bb40b">
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4874
#### Special notes for your reviewer:
在 Windows 平台下测试 `pnpm dev` 和 `pnpm build`,检查是否能够正常运行。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area console
/kind improvement
/milestone 2.11.x
#### What this PR does / why we need it:
修复代码错误导致的控制台警告。异常现象:备份列表页面,有多少备份文件就会有多少个警告日志。
![image](https://github.com/halo-dev/halo/assets/44720422/2dc64621-9731-4647-b23e-c3a5aa115c37)
#### Which issue(s) this PR fixes:
Fixes#4871
#### Special notes for your reviewer:
None
#### Does this PR introduce a user-facing change?
```release-note
修复备份页面中的浏览器控制台警告日志
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/pull/4850#issuecomment-1812068735 for more.
Test steps:
```bash
make -C console build
./gradlew clean build -x check
docker build -t halo:not-find-main-class .
docker run -it --rm -p 8090:8090 -v ~/.halo2:/root/.halo2 halo:not-find-main-class
```
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
This PR upgrades to SpringDoc 2.2.1-SNAPSHOT to resolve the problem of Swagger API doc display errors.
#### Does this PR introduce a user-facing change?
```release-note
升级 SpringDoc 至 2.2.1-SNAPSHOT 以解决部分 API 文档无法正常使用的问题
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
- Upgrade to Spring Boot 3.2.0-RC2.
- Fix unit test errors due to upgrading.
See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.0-RC2 for more.
#### Does this PR introduce a user-facing change?
Anyone who is using H2 database and wants to upgrade this version has to backup and restore Halo or upgrade old h2 database file manually.
```release-note
[Action Required] 升级 Spring Boot 至 3.2.0-RC2
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR fixes the unit test errors on Windows environment, mainly caused by different file systems.
```bash
PS C:\Users\johnniang\IdeaProjects\halo> ./gradlew check
> Task :application:checkstyleTest
Checkstyle rule violations were found. See the report at: file:///C:/Users/johnniang/IdeaProjects/halo/application/build/reports/checkstyle/test.html
Checkstyle files with violations: 16
Checkstyle violations by severity: [warning:43]
> Task :application:checkstyleMain
Checkstyle rule violations were found. See the report at: file:///C:/Users/johnniang/IdeaProjects/halo/application/build/reports/checkstyle/main.html
Checkstyle files with violations: 135
Checkstyle violations by severity: [warning:218]
> Task :application:test
BUILD SUCCESSFUL in 1m 39s
25 actionable tasks: 5 executed, 20 up-to-date
```
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area console
#### What this PR does / why we need it:
为文章以及页面预览增加终端切换功能,类似于预览主题的终端切换
#### Which issue(s) this PR fixes:
Fixes#4789
#### Special notes for your reviewer:
测试方式:
本地运行halo,预览文章和页面,切换不同终端,各个界面正常显示且功能正常。
#### Does this PR introduce a user-facing change?
```release-note
文章预览支持模拟不同设备尺寸。
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
Upgrade to Gradle 8.4 by executing command `./gradlew wrapper --gradle-version 8.4 --distribution-type all`.
See https://docs.gradle.org/8.4/release-notes.html for more.
#### Does this PR introduce a user-facing change?
```release-note
升级 Gradle 至 8.4
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
Currently, some Windows developers using GBK as character encoding are unable to build project, please see https://github.com/halo-dev/halo/issues/4771 for more.
Because the source code are using UTF-8 character encoding, the `javadoc`, `compileJava`, `compileTestJava` and `delombok` tasks will use the default character encoding GBK to handle the sources, which prevents the `:api:javadoc` task from running properly.
At the same time, we thank to @DaiYuANg for his first proposed solution in https://github.com/halo-dev/halo/pull/4517.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4771
#### Special notes for your reviewer:
Validate the result by executing command `./gradlew clean build -x check` on Windows environment.
#### Does this PR introduce a user-facing change?
```release-note
修复在部分 Windows 开发者无法正常构建 Halo 的问题
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
Please see https://html.spec.whatwg.org/multipage/semantics.html#meta-generator for more.
This PR add the generator meta into head, so that we can know what sites are using Halo.
```bash
http localhost:8090/ | grep generator
<meta name="generator" content="Halo 2.11.0-SNAPSHOT"/>
```
If someone want to disable the generator meta, they can configure the property `halo.theme.generator-meta-disabled` to `true`.
#### Does this PR introduce a user-facing change?
```release-note
添加 Generator 元数据标识
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
修改发布文章的等待时间以防止因数据库执行延迟较高导致的错误提示
最大等待时间为:`100ms * 2 ^ (retryNum - 1)` = `25600ms`
总共需等待时间为:`100ms * (2 ^ retryNum - 1)` = `31900ms` = `31.9 s`
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.11.x
#### What this PR does / why we need it:
重构去重元数据的逻辑,解决删除元数据后仍旧提示 key 不能重复的问题。
#### How to test it?
1. 在文章列表点击设置按钮
2. 添加两个个空的元数据,不保存直接关闭设置框。
3. 再次打开设置框,点击删除空的元数据,查看是否会提示 key 重复。
#### Does this PR introduce a user-facing change?
```release-note
解决删除元数据后仍旧提示 key 不能重复的问题
```
#### What type of PR is this?
/area console
/kind improvement
/milestone 2.11.x
#### What this PR does / why we need it:
为插件的 bundle.css 和 bundle.js 重定向请求添加时间戳参数,防止被浏览器、Nginx、CDN 服务缓存,导致插件的资源不能及时更新。
#### Which issue(s) this PR fixes:
Fixes#4803
#### Special notes for your reviewer:
测试方式:
1. 在 Firefox 浏览器测试启动和停止若干插件,观察插件提供的 UI 样式是否正常即可。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端插件捆绑资源的请求,防止在操作插件状态之后无法及时更新资源。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
修改发布文章的等待时间以防止因数据库执行延迟较高导致的错误提示
最大等待时间为:`100ms * 2 ^ (retryNum - 1)` = `1600ms`
总共需等待时间为:`100ms * (2 ^ retryNum - 1)` = `3100ms`
#### Does this PR introduce a user-facing change?
```release-note
修改发布文章的等待时间以防止因数据库执行延迟较高导致的错误提示
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
优化了编辑器的性能,并解决了卡死现象。具体措施如下:
1. 编辑器异步加载时,由于其 component 并不会使用响应式,所以也无需进行代理,因此使用 `markRaw` 将其转为普通对象,可以优化 vue 性能。
2. 由于 `DefaultEditor` 有多个根节点导致透传的 attrs 无法设置,因此新增一个 div 节点将其原有节点包裹。参见 https://cn.vuejs.org/guide/components/attrs.html#attribute-inheritance-on-multiple-root-nodes 。
3. 原有编辑器实例在切换路由之后不会释放,此次修改之后,将在 vue 的 `onBeforeUnmount` 时间中手动释放编辑器实例。
#### How to test it?
1. 新建文章,新建一个表格。
2. 不要保存,点击文章路由跳出编辑器界面,再次点击上一次所编辑器的文章,查看是否会卡死。
#### Which issue(s) this PR fixes:
Fixes#4798
#### Does this PR introduce a user-facing change?
```release-note
优化编辑器性能并解决切换页面所造成的卡死现象
```
#### What type of PR is this?
/kind feature
/area core
/area console
#### What this PR does / why we need it:
This PR add a route to support user-center.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.11.x
#### What this PR does / why we need it:
Fix the problem that we will encounter "insufficient roles" error while creating PAT with hidden roles.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4783
#### Does this PR introduce a user-facing change?
```release-note
修复因部分角色导致无法正常创建个人令牌的问题
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
console附件页面List Mode和Grid Mode的tooltip写反了:
<img width="1172" alt="image" src="https://github.com/halo-dev/halo/assets/4889894/6645b29f-7e92-4c42-9938-892e53f92115">
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修复附件管理布局切换按钮的提示文字。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.10.x
#### What this PR does / why we need it:
如果文章是发布状态但没有发布时间则自动填充
#### Does this PR introduce a user-facing change?
```release-note
None
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/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?
/kind bug
<!--
添加其中一个类别:
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:
在主题使用如下FinderAPI时
![image](https://github.com/halo-dev/halo/assets/93673944/723e9f4e-0192-48e4-be18-2300579215bd)
将产生如下错误
![image](https://github.com/halo-dev/halo/assets/93673944/d36c9dd7-d754-4d41-a6d2-06027359bb4e)
因为方法定义为
![image](https://github.com/halo-dev/halo/assets/93673944/a3b95df3-96f8-427e-b9c0-7e97e5d2335d)
所以修改方法参数
#### 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
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
当前用户上传头像时的接口中名字应该是 `-` 而不是具体的 metadata name。
#### How to test it?
使用无用户管理权限的用户登录,查看是否能上传头像。
#### Which issue(s) this PR fixes:
Fixes#4776
#### Does this PR introduce a user-facing change?
```release-note
解决无用户管理权限的用户无法上传头像的问题
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
在获取自定义元数据时,将空白 key 与重复的 key 过滤,用于解决可能出现的额外空白元数据及报错问题。
#### How to test it?
尝试点击编辑文章 -> 设置,查看是否有额外空白元数据的出现。
由于是概率性问题,因此若本地环境未复现,则需要使用生产环境进行验证。
#### Which issue(s) this PR fixes:
Fixes#4764
#### Does this PR introduce a user-facing change?
```release-note
解决文章设置中可能出现空白元数据的问题
```
#### What type of PR is this?
/area console
/kind improvement
#### What this PR does / why we need it:
适配 https://github.com/halo-dev/halo/pull/4745 ,使用新的接口启动/停止插件。
#### Which issue(s) this PR fixes:
Fixes#4744
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.10.x
#### What this PR does / why we need it:
修复筛选未发布文章时结果不正确的问题
#### Which issue(s) this PR fixes:
Fixes#4730
#### Does this PR introduce a user-facing change?
```release-note
修复筛选未发布文章时结果不正确的问题
```
#### What type of PR is this?
/kind improvement
/area core
/area console
#### What this PR does / why we need it:
提供允许同步更改插件运行状态的 API
#### Which issue(s) this PR fixes:
Fixes#4744
#### Does this PR introduce a user-facing change?
```release-note
提供允许同步更改插件运行状态的 API
```
#### What type of PR is this?
/kind cleanup
#### What this PR does / why we need it:
Upgrade to Spring Boot 3.1.5. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.5 for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Spring Boot 至 3.1.5
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
![fix-status-filter-2](https://github.com/halo-dev/halo/assets/106857035/e1f0a7ea-1328-45f2-ad06-cf14e91b8e4a)
#### Which issue(s) this PR fixes:
Fixes#4731
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端评论状态筛选无法显示筛选结果的问题
```