#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
修改评论和回复的创建时间字段。适配:https://github.com/halo-dev/halo/pull/3341
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3330
#### Special notes for your reviewer:
None
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复新建分类和标签之后再次打开表单,别名显示为 undefined 的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3382
#### Special notes for your reviewer:
测试方式:
1. 新建分类或者标签,创建完成之后再次打开创建表单,检查别名是否还为 undefined。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端新建分类和标签之后再次打开表单,别名显示为 undefined 的问题。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
优化分类和标签管理页面自动刷新的条件,现在支持检测 `status.permalink` 是否已经生成完毕,如果没有会自动刷新列表。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3376
#### Special notes for your reviewer:
测试方式:
1. 测试添加若干分类和标签,观测在没有生成 permalink 的情况下,是否会自动刷新列表。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端分类和标签管理的自动刷新条件,支持检测固定链接是否已经生成。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构文章相关数据请求的相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 测试文章相关联的页面,包括文章管理、分类、标签。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/milestone 2.3.x
/area console
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3357
#### Special notes for your reviewer:
测试使用主题/插件自定义的元数据信息,是否能够在 console 中显示默认值。
#### Does this PR introduce a user-facing change?
```release-note
使用主题/插件配置的元数据将能够展示默认值
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构附件相关数据请求的相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 测试附件管理页面的筛选、存储策略、分组等业务。
2. 测试附件选择模态框组件。
#### 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:
优化用户名的校验规则,目前采用 DNS 名称的规则,即:必须以字母(a-z或A-Z)开头,并包含字母数字字符(a-z,A-Z,0-9)和连字符(-)。每一段名称以字母结尾(a-z或A-Z)。名称以点(.)分隔
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3239
#### Screenshots:
#### Special notes for your reviewer:
测试方式:
1. 新建用户,检查用户名输入规则是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端新建用户时,用户名的校验规则。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用 [TanStack Query](https://github.com/TanStack/query) 重构插件管理列表的数据请求相关逻辑。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3360
#### Special notes for your reviewer:
测试方式:
1. 需要 `pnpm install`
2. 插件管理页面,安装若干插件。
3. 测试分页、条件筛选等逻辑是否正常。
#### Does this PR introduce a user-facing change?
```release-note
None
```
What type of PR is this?
/kind bug
What this PR does / why we need it:
将ghost用户从用户列表隐藏。
Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3317
```release-note
NONE
```
#### What type of PR is this?
/kind improvement
#### 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
#### What this PR does / why we need it:
将 https://github.com/halo-sigs/api-client 移动到 Console 的仓库进行管理。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3302
#### Special notes for your reviewer:
测试方式:
1. 需要先 `pnpm install && pnpm build:packages`
2. 测试开发环境(pnpm dev)和构建之后(pnpm build)是否能够正常使用。
#### 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:
静默请求所有角色信息,用于显示 displayName。(临时解决方案)
#### 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:
将 @LIlGG 添加到 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:
修复 Actuator 页面抖动的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3225
#### Special notes for your reviewer:
测试方式:
1. 测试进入系统概览页面是否会出现 https://github.com/halo-dev/halo/issues/3225 中提到的页面抖动问题。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端进入系统概览页面会抖动的问题。
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复 Console 端 FormKit 的 Code 输入类型宽度异常
#### Which issue(s) this PR fixes:
Fixes # https://github.com/halo-dev/halo/issues/3227
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端 FormKit 的 Code 输入框宽度未占满的问题
```
<!-- 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 improvement
/area console
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization
适当添加其中一个或多个类别(可选):
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:
添加`X-Requested-With=XMLHttpRequest`请求头,以阻止spring security 带上`WWW-Authenticate`响应头导致弹出原生登录框。
#### 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/3213
#### Screenshots:
<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.
eg.
Before:
![screenshot-before](https://user-images.githubusercontent.com/screenshot.png)
After:
![screenshot-after](https://user-images.githubusercontent.com/screenshot.png)
-->
#### Special notes for your reviewer:
使session过期后(直接删除cookie的session或重启后端),继续操作console端,预期不会弹出原生登录框且console端原有的重新登录form正常弹出。
详情https://spring.io/guides/tutorials/spring-security-and-angular-js/ 中搜索X-Requested-With
#### 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 improvement
#### What this PR does / why we need it:
发布 Console 2.2.0
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
#### What this PR does / why we need it:
添加复制或者拖拽图片到编辑器上传的支持。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3109
Fixes https://github.com/halo-dev/halo/issues/2946
#### Screenshots:
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
Console 端的默认编辑器支持拖拽或者粘贴图片上传
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复在开发环境下首次初始化后,没有加载默认主题的情况下无法访问主题管理页面的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3187
#### Special notes for your reviewer:
测试方式:
1. 在开发环境使用全新的数据库初始化。
2. 检查是否能够正常的访问主题管理页面。
#### 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:
修改获取文章和自定义页面内容的 API,用于适配:https://github.com/halo-dev/halo/pull/3168
#### Special notes for your reviewer:
测试方式:
1. 测试文章和自定义页面编辑时,能否正常获取内容即可。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.2.x
#### What this PR does / why we need it:
文章、独立页面、分类、标签支持自动生成别名。
策略:
1. 仅在创建时会自动根据标题或者名称自动生成别名,编辑时如果需要重新生成,可以点击输入框右侧的按钮。
2. 中文会被转为拼音并用 - 隔开,需要注意多音字的情况,目前无法保证多音字是否符合预期。
3. 使用了 https://www.npmjs.com/package/transliteration 库。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3171
#### Screenshots:
<img width="782" alt="image" src="https://user-images.githubusercontent.com/21301288/213849446-18d70974-7b2c-420c-bd50-93d2c3193895.png">
#### Special notes for your reviewer:
测试方式:
1. 需要 `pnpm install`
4. 测试文章、独立页面、分类、标签创建时,是否可以自动设置别名。
5. 测试别名输入框右侧的生成别名按钮是否正常工作。
6. 测试分类和标签选择器创建新分类或标签时,是否正确设置了别名。
#### Does this PR introduce a user-facing change?
```release-note
Console 端的文章、独立页面、分类、标签支持自动生成别名
```
#### What type of PR is this?
/kind improvement
/milestone 2.2.x
#### What this PR does / why we need it:
使用新的 API 来管理插件,用于区分插件管理和配置相关的权限。适配:https://github.com/halo-dev/halo/pull/3142
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3069
#### Screenshots:
#### Special notes for your reviewer:
测试方式:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3142 分支。
2. Console 需要 `pnpm install`。
1. 插件设置项,需要测试保存,安装新插件之后表单是否正常。
3. 创建一个角色,测试仅有管理/查看插件的角色,登录之后检查是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
重构 Console 端插件的设置表单逻辑。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
使用新的 API 来管理主题,用于区分主题管理和配置相关的权限。适配:https://github.com/halo-dev/halo/pull/3135
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3069
#### Screenshots:
#### Special notes for your reviewer:
重点测试:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3135 分支。
2. Console 需要 `pnpm install`。
1. 主题设置项,需要测试保存,安装新主题之后表单是否正常。
3. 创建一个角色,测试仅有管理/查看主题的角色,登录之后检查是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
重构 Console 端主题的设置表单逻辑。
```