#### What type of PR is this?
/kind improvement
/area console
/milestone 2.6.x
#### What this PR does / why we need it:
从 `@halo-dev/components` 包中移除 VCodemirror 组件,改为由 Console 内置。因为观察到 VCodemirror 暂时无法支持 Tree Shaking,即代表如果在其他地方引入了 `@halo-dev/components`,就算没有使用 VCodemirror 组件,也会构建到生产产物。
此外,内置到 Console 之后,改为了异步加载此组件,即进入到使用了 VCodemirror 的组件的页面才会加载相应资源。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3469
#### Special notes for your reviewer:
测试方式:
1. Console 需要 `pnpm build:packages`
2. 测试系统设置中的代码注入部分,观察输入框是否加载正常即可。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milstone 2.6.x
#### What this PR does / why we need it:
将 TanStack Query 的 Network Mode 设置为 always,防止在无网络的情况下,开发环境也无法请求数据。
#### Special notes for your reviewer:
测试方式:断网之后使用开发模式访问 Console,观察请求是否正常发送即可。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.6.x
#### What this PR does / why we need it:
修复部分 FormKit 的 radio 表单项的 label 设置不正确的问题。目前影响范围:
1. 使用了 type 为 `menuCheckbox` `menuRadio` 并将 validation 设置为了 `required`。

#### Which issue(s) this PR fixes:
Fixes#3876
#### Does this PR introduce a user-facing change?
```release-note
修复部分 FormKit 的 radio 表单项的 label 设置不正确的问题。
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.6.x
#### What this PR does / why we need it:
修复初始化时,预设插件安装失败的问题,目前的解决方案是重试安装操作。
#### Which issue(s) this PR fixes:
Fixes#3893
#### Special notes for your reviewer:
测试方式:
1. 建议参考 https://docs.halo.run/developer-guide/core/build 构建成 Docker 镜像再测试。
2. 测试初始化完成之后,预设插件是否正确安装以及启动即可。
#### Does this PR introduce a user-facing change?
```release-note
修复在初始化时,预设插件可能初始化失败的问题。
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.6.x
#### What this PR does / why we need it:
修复用户头像不支持相对链接的问题。
#### Which issue(s) this PR fixes:
Fixes#3879
#### Special notes for your reviewer:
测试方式:
1. 创建或者编辑用户资料。
2. 从附件库选择头像,检查是否可以通过表单验证。
#### Does this PR introduce a user-facing change?
```release-note
修复创建用户或者修改用户资料时,头像链接不支持相对链接的问题。
```
解决删除某个插件项导致其他插件项渲染失败的问题
<!-- 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:
解决插件列表渲染问题
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3866
<!--
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:
https://user-images.githubusercontent.com/106857035/235871211-ee469964-d7b3-41d3-ac9b-6997872ac507.mp4
#### 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
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修复在 Dialog 组件中,如果 onConfirm 方法出现异常,按钮加载状态没有复原的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3844
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
添加复制附件链接的功能,支持三种格式:URL、HTML 格式、Markdown 格式。
#### Which issue(s) this PR fixes:
Fixes#3801
#### Special notes for your reviewer:
测试方式:
1. 上传若干不同格式的附件。
2. 打开附件详情,检查列出的格式是否正确。
3. 检查复制链接的内容是否正确。
#### Does this PR introduce a user-facing change?
```release-note
Console 端的附件详情支持复制链接的功能。
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.0
#### What this PR does / why we need it:
修复登录表单与顶部间距异常的问题,并解决在 https://github.com/halo-dev/halo/pull/3756 中提到的在低分辨率屏幕下,语言选择和表单元素重叠的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3806
#### 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
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修改 Vue Router 的 scrollBehavior 配置,添加是否是不同路由的跳转,如果是才会在跳转之后滚动到页面顶部。可以解决在 https://github.com/halo-dev/halo/issues/3833 中提到的打开附件详情之后,列表滚动到顶部的问题。这是因为在打开附件详情的时候会修改路由的参数。
#### Which issue(s) this PR fixes:
Fixes#3833
#### 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 bug
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修复文章分类和标签选择组件在 Repeater 组件中,下拉框无法完整显示的问题。
<img width="598" alt="image" src="https://user-images.githubusercontent.com/21301288/233818471-0334b449-e2eb-44aa-a5ce-ed9a4ad54e8b.png">
#### Which issue(s) this PR fixes:
Fixes#3479
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端的文章分类和标签选择组件在 Repeater 组件中,下拉框无法完整显示的问题。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.5.x
/kind api-change
#### What this PR does / why we need it:
提供自定义 API 用于创建用户账号
简化了创建用户账号需要先创建账号,再分配角色再重置密码的复杂流程。
需要 Console 端适配此 PR
#### Which issue(s) this PR fixes:
Fixes#2852
#### Does this PR introduce a user-facing change?
```release-note
优化用户账号创建流程
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
为 FormKit 表单中包含了 required 验证的表单元素的 label 添加指示器(*),优化可访问性。
<img width="694" alt="image" src="https://user-images.githubusercontent.com/21301288/233822533-6a30b43e-738a-47f3-92c1-045d34cc1ba3.png">
#### Which issue(s) this PR fixes:
Fixes#3823
#### Special notes for your reviewer:
测试方式:
1. 检查 Console 端的表单中必填项的 label 是否添加了 * 即可。
#### Does this PR introduce a user-facing change?
```release-note
为 FormKit 表单中包含了 required 验证的表单元素的 label 添加指示器(*),优化可访问性。
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
调整 ESLint 的执行参数,添加 max-warnings 为 0,意味着在提交或者运行 CI 的时候不再允许包含 warning 级别的检测。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
升级 @tanstack/vue-query 的版本至 [v4.29.1](https://github.com/TanStack/query/releases/tag/v4.29.1),并默认将 `refetchOnWindowFocus` 选项设置为 false。此选项的作用是当窗口重新聚焦时,刷新当前页面请求的状态(重新请求接口),目前暂时不需要使用它。
#### Does this PR introduce a user-facing change?
```release-note
升级 Console 端 `@tanstack/vue-query` 依赖的版本至 [v4.29.1](https://github.com/TanStack/query/releases/tag/v4.29.1)
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修复升级插件之后没有自动刷新页面的问题,一般情况来说,升级插件之后需要重载插件 Console 部分的资源。
#### Special notes for your reviewer:
测试方式:
1. 以 deployment 模式启动 Halo
2. 测试升级插件之后是否有正常刷新页面
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端升级插件之后没有自动刷新页面的问题。
```
#### What type of PR is this?
/kind feature
/area console
/milestone 2.5.0
#### What this PR does / why we need it:
为 Console 端添加 Description 组件。
#### Which issue(s) this PR fixes:
Fixes#3790
#### Special notes for your reviewer:
测试方式:
1. 检查主题管理、插件详情、认证方式详情页面的样式是否异常即可。
#### Does this PR introduce a user-facing change?
```release-note
为 Console 端添加 Description 组件。
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
支持在附件上传弹框中点击完成按钮关闭弹框。
<img width="647" alt="image" src="https://user-images.githubusercontent.com/21301288/232964793-d4e94e7a-fc81-4d1b-b0fc-b93d8f5bc537.png">
#### Special notes for your reviewer:
测试方式:
1. 测试上传完附件之后,点击完成按钮,观察是否关闭上传弹框即可。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端上传附件的弹框,支持点击完成按钮以关闭弹框。
```
#### What type of PR is this?
/kind feature
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
为上传组件 Uppy 导入中文繁体的语言包。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/pull/3672
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/kind api-change
/area core
/milestone 2.5.x
#### What this PR does / why we need it:
Add property `halo.use-absolute-permalink`(default is `false`) to control permalink generation. Leave `halo.external-url` as `null` by default.
Meanwhile, I enhanced `ExternalUrlSupplier#getURL` to get URL from not only properties but only http request.
#### How to use it?
```yaml
halo:
use-absolute-permalink: false
```
Or:
```yaml
halo:
external-url: https://halo.run/
use-absolute-permalink: false
```
Or:
```yaml
halo:
external-url: https://halo.run/
use-absolute-permalink: true
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3762
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
新增是否生成相对地址的配置
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
在主题列表激活主题之后,自动刷新页面。
#### Which issue(s) this PR fixes:
Fixes#3778
#### 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
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
优化安装主题和升级主题的流程,支持在升级或者安装之后自动关闭弹框以及刷新数据。
#### Special notes for your reviewer:
测试方式:
1. 测试升级或者安装新主题之后是否关闭弹框以及是否有提示即可。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端安装和升级主题的流程,支持自动关闭安装弹框和显示反馈提示
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
为默认编辑器侦听器增加 `immediate` 属性,使其在创建之后立即执行,生成目录。
#### Which issue(s) this PR fixes:
Fixes#3769
#### Special notes for your reviewer:
打开已经存在并且具有标题的文章/页面,查看大纲是否正常生成。
#### Does this PR introduce a user-facing change?
```release-note
修复文章/页面已有内容重新编辑时,无法立即显示大纲的问题。
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
修复 Console 端仪表盘添加组件时,切换标签页面报错的问题。
#### Which issue(s) this PR fixes:
Fixes#3764
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端仪表盘添加组件时的报错问题。
```
#### What type of PR is this?
/kind feature
/area core
#### What this PR does / why we need it:
Use Gradle plugin `maven-publish` to publish Halo modules(`platform.application`, `platform.plugin` and `api`) to Maven central repository.
```bash
# Try to publish to Maven local repository.
./gradlew publish
# Really publish to Maven central repository.
./gradlew -Prelease publish -PossrhUsername=username -PossrhPassword=password
```
Note that currently we only support manually publishing.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2730
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
此修改对登录、注册界面原有风格无影响。解决了1920*1080分辨率下,注册界面,“已有账号 立即登录”与“简体中文”文字重叠问题
#### Which issue(s) this PR fixes:
Fixes#3695
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
解决1920*1080分辨率下,注册界面,“已有账号 立即登录”与“简体中文”文字重叠问题
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
获取主题配置时,重复添加了上次已经获取到的主题配置,导致重复显示。并同步修改了 plugin 中可能出现问题的位置。
#### Which issue(s) this PR fixes:
Fixes#3726
#### Special notes for your reviewer:
1. 打开 Console 端主题页面
2. 点击右上角预览页面
3. 关闭预览页面,选项卡无重复即为正常。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端主题设置中,选项卡会重复显示的问题
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修复保存系统设置之后,启用主题的设置丢失,恢复为了默认主题。原因是因为在 https://github.com/halo-dev/halo/pull/3606 中使用了新的 useSettingFormConvert 方法,但这个方法未考虑到某些 ConfigMap 的分组并未在表单中定义,也就是数据转换方法是以表单的定义为基准,所以丢失了 `theme.active` 设置。
#### Which issue(s) this PR fixes:
Fixes#3673
#### Special notes for your reviewer:
测试方式:
1. 安装若干主题并启用。
2. 然后去系统设置修改任意数据并保存。
3. 检查主题是否被修改为默认主题。
#### Does this PR introduce a user-facing change?
```release-note
修复保存系统设置之后导致激活主题的设置值丢失,恢复为了默认主题的问题。
```
#### What type of PR is this?
/kind feature
/area core
#### What this PR does / why we need it:
Add zhTW locale.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3346
#### Does this PR introduce a user-facing change?
```release-note
提供繁体中文(TW)翻译
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.5.x
/cherry-pick release-2.4
#### What this PR does / why we need it:
升级 `@halo-dev/richtext-editor` 的版本以解决编辑器翻译不完整的问题。
see https://github.com/halo-sigs/richtext-editor/pull/7
#### Does this PR introduce a user-facing change?
```release-note
升级 `@halo-dev/richtext-editor` 的版本以解决编辑器部分文本翻译不完整的问题。
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
Configure default external-url as slash. So that system will generate relative links for all permalinks.
See https://github.com/halo-dev/halo/issues/3654 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3654
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.x
/cherry-pick release-2.4
#### What this PR does / why we need it:
修复使用了 FormKit Schema 生成的表单中,Radio 输入类型如果值的类型定义为 boolean 类型,但得到的结果为 string 类型的问题。
#### Which issue(s) this PR fixes:
Fixes#3666
#### Special notes for your reviewer:
测试方式:
1. 安装一个主题设置使用了 Radio 输入类型的主题,比如 https://github.com/halo-dev/halo-theme-anatole
2. 测试保存其中包含了 Radio 输入类型的表单。
3. 刷新页面,检查值回显是否正确。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端 FormKit Schema 生成的表单中,Radio 输入类型值类型为 boolean 但结果为 string 的问题。
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.x
/cherry-pick release-2.4
#### What this PR does / why we need it:
修复文章设置中的发布时间无法回显导致重新保存时丢失发布时间的问题。
#### Which issue(s) this PR fixes:
Fixes#3669
#### Special notes for your reviewer:
测试方式:
1. 新建或者修改已有文章的设置。
2. 检查时间输入框的时间是否显示正确。
3. 检查保存之后时间是否显示正确。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端文章设置中的发布时间无法回显导致重新保存时丢失发布时间的问题。
```
#### What type of PR is this?
/kind bug
/area console
/cherry-pick release-2.4
#### What this PR does / why we need it:
修复后台全局搜索中关于 Console 路由的文字没有适配 i18n 的问题。
#### Which issue(s) this PR fixes:
Fixes#3664
#### Special notes for your reviewer:
<img width="741" alt="image" src="https://user-images.githubusercontent.com/21301288/229279243-4b727cc7-1790-41b3-a170-4958ce1f65a8.png">
#### Does this PR introduce a user-facing change?
```release-note
修复后台全局搜索中关于 Console 路由的文字没有适配 i18n 的问题。
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.5.x
#### What this PR does / why we need it:
修复附件存储策略编辑表单无法正常渲染的问题。此问题原因为 Modal 组件使用了 OverlayScrollbars 库来模拟滚动条,但在初始化的时候由于 Body 没有任何子元素,所以导致异常。
#### Which issue(s) this PR fixes:
Fixes#3662
#### Special notes for your reviewer:
测试是否能够正常打开附件存储策略编辑表单即可。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端附件存储策略编辑表单无法正常渲染的问题
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
修改 Console 的版本号为 2.4.0。
修改 `@halo-dev/components` 的版本为 1.3.0
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.4.0
#### What this PR does / why we need it:
重新生成 api client。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.x
#### What this PR does / why we need it:
重新设计登录页面的样式和用户体验。
#### Which issue(s) this PR fixes:
Fixes#3572
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端登录页面样式
```
#### What type of PR is this?
/kind feature
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
添加角色选择的 FormKit 输入类型。
#### Which issue(s) this PR fixes:
Fixes#3637
#### Special notes for your reviewer:
测试方式:
1. 测试为用户分配角色,检查角色下拉框是否正常加载角色列表即可。
#### 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
Console 端添加角色选择的 FormKit 输入类型。
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.x
#### What this PR does / why we need it:
优化插件详情页面获取角色模板的条件,不查询 label 中带了 `halo.run/hidden` 的角色模板。
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端在插件详情页面上获取角色模板的条件
```
#### What type of PR is this?
/kind feature
/area core
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
新增用户注册功能
#### Which issue(s) this PR fixes:
Fixes#2813
#### Special notes for your reviewer:
#### 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. 测试系统设置的表单加载是否正常,以及保存之后重载配置是否正常。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
FormKit 和 Uppy 上传组件支持同步设置系统语言。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3574
#### Special notes for your reviewer:
在不同语言的浏览器中测试表单的验证和上传组件的语言是否显示正确即可。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
优化左侧菜单栏边框阴影的样式。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3629
#### Does this PR introduce a user-facing change?
```release-note
优化左侧菜单栏边框阴影的样式。
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.x
#### What this PR does / why we need it:
重新在全局注册 FloatingDropdown 组件,因为在 https://github.com/halo-dev/halo/pull/3576 中移除之后,会导致插件无法正常加载 FloatingDropdown 组件,从而带来破坏更新。
#### Which issue(s) this PR fixes:
Fixes#3621
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
修复跳转页面之后无法固定菜单滚动位置的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3633
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.4.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 console
/milestone 2.4.x
#### What this PR does / why we need it:
升级 Console 依赖的所有 patch 版本,由于升级了 prettier 的版本,可能发生了规则改变,所以同时包含重新格式化后的文件。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
/milestone 2.4.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
#### 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 bug
/area console
/milestone 2.4.x
#### What this PR does / why we need it:
修复从文章列表打开设置之后保存会调用两次发布接口的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3615
#### Special notes for your reviewer:
测试从文章列表打开设置后保存是否会调用多次发布接口即可。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端发布文章可能调用多次接口的问题。
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
通过点击“眼睛”图标,可以比较方便地修改文章或者页面的可视性。
<img width="1150" alt="image" src="https://user-images.githubusercontent.com/114651359/227491296-5f96e605-1137-4f6f-b506-d33b329045fc.png">
#### Which issue(s) this PR fixes:
Ref #3501
#### Special notes for your reviewer:
1.修改了两个页面,路径为:
(1)console/src/modules/contents/pages/SinglePageList.vue
(2)console/src/modules/contents/posts/PostList.vue
2.原本“眼睛”图标是没有设置点击事件的,现在添加了点击改变选中文章或页面可视性的功能。
#### Does this PR introduce a user-facing change?
```release-note
action required 当用户点击“眼睛”图标时,会提示用户“可视化修改成功”
```
#### What type of PR is this?
/kind bug
/area console
/milestone 2.4.x
#### What this PR does / why we need it:
修复解绑三方登录失败的问题,原因是解绑接口是 put 请求,但请求接口时用了 post 请求。
#### Special notes for your reviewer:
测试方式:
1. 安装 OAuth2 插件:https://github.com/halo-sigs/plugin-oauth2/pull/3
2. 配置某个三方的 OAuth 登录。
3. 测试在个人资料中的绑定和解绑三方登录。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area console
/milestone 2.4.0
#### What this PR does / why we need it:
修改 Console 以及其下 packages 的版本为 2.4.0-rc.1
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
修正 Console 构建的输出目录,此问题由 https://github.com/halo-dev/halo/pull/3552 导致。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
隐藏个人资料中未启用的认证方式。
#### Which issue(s) this PR fixes:
Fixes#3556
#### Special notes for your reviewer:
测试方式:
1. 安装 OAuth 2 插件:https://github.com/halo-sigs/plugin-oauth2/pull/3
2. 再不做任何配置的情况下,访问已登录用户的个人资料页面,检查是否列出了认证方式。
3. 配置某个认证方式并开启,再检查是否列出了已启用的认证方式。
#### 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:
使用 [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 bug
/area console
#### What this PR does / why we need it:
修复使用非本地认证登录之后,无法重新登录的问题。此问题来源是三方登录方式登录之后没有在 localStorage 存入 `logged_in` 的 flag。并且在引入匿名用户之后,本身也不再需要这个 flag。
#### Which issue(s) this PR fixes:
Fixes#3569
#### Special notes for your reviewer:
测试方式:
1. 使用 https://github.com/halo-sigs/plugin-oauth2/pull/3 插件配置 OAuth 2 的登录方式。
2. 在个人资料中绑定配置的登录方式。
3. 测试登录之后退出,再进行登录。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
为 Switch 组件添加 disabled 属性以支持禁用。
<img width="1403" alt="image" src="https://user-images.githubusercontent.com/21301288/226829739-914eca3d-6d33-4d8c-9cc8-fe19b655ad9d.png">
#### Special notes for your reviewer:
1. `cd path/to/console/packages/components`
2. `pnpm story:dev`
3. 测试 Switch 组件的 disabled 属性是否工作正常。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area console
#### What this PR does / why we need it:
修复新建文章或页面保存后,本地内容缓存可能不会及时清空的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3380
#### Special notes for your reviewer:
测试方式:
1. 连续创建多篇新的文章,然后反复进入新建页面,观察是否有恢复缓存的提示。
#### 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
/area console
#### What this PR does / why we need it:
默认禁用 password 输入框的浏览器自动填充,实现方式为默认给 type 为 password 的 input 添加 `autocomplete="new-passwrod"` 属性。如果需要自动填充,手动为组件添加 `autocomplete` 属性即可。
此改动主要是针对非登录表单场景的密码输入框来做优化,在这些场景下,浏览器如果自动填充用户保存的用户名密码,会带来一定的干扰。
<img width="1103" alt="image" src="https://user-images.githubusercontent.com/21301288/226558568-bf617be7-0cd8-44db-a123-f230a2b88181.png">
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3502
#### Special notes for your reviewer:
1. 登录 Console,并将用户名和密码保存在浏览器的密码管理器。
2. 然后进入任意使用了密码输入框的页面,检查是否自动填充了密码。推荐使用 https://github.com/halo-sigs/plugin-s3 测试。
#### Does this PR introduce a user-facing change?
```release-note
禁用非登录场景下,密码输入框的浏览器自动填充
```
#### What type of PR is this?
/kind feature
#### What this PR does / why we need it:
为 Console 端添加多语言的支持,并默认提供简体中文和英文的语言包。
todolist:
- [x] 完善 Console 的文字语言包翻译。
- [ ] ~~为后端提供的部分数据支持翻译,比如系统设置的表单定义。(实现方式待讨论,这个 PR 先不支持)~~
- [x] 提供语言设置。
#### Which issue(s) this PR fixes:
Fixes#3346
#### Special notes for your reviewer:
测试方式:
1. 检查各个页面的文字显示是否正常。
2. 测试中英文环境中是否使用了对应的语言包。
#### Does this PR introduce a user-facing change?
```release-note
Console 端支持多语言界面
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR totally refactor project structure for a better plugin development. Now we can maintain and publish api and platform modules at Halo application side, which will be references by plugins.
Currently, we can execute command `./gradlew clean publish` to publish api and platform modules into **local** Maven repository, so that we can refer these dependencies (`run.halo.tools.platform:plugin:2.4.0-SNAPSHOT` and `run.halo.app:api:2.4.0-SNAPSHOT`) in plugin projects.
I will make another pull request to publish api library and platforms into Maven central repository.
**Modules explanation**:
- API module contains common classes which might be used by plugins.
- Plugin Platform module contains dependency declarations of other plugin API modules.
- Application Platform module contains dependency declarations application module might uses.
If we want to build application only(exclude check and jar), we have to execute the command below:
```bash
./gradlew clean :application:build -x :application:check -x :application:jar
```
The executable Jar will be generated at folder `application/build/libs/`.
If we want to build a Docker image, we could execute the command below:
```bash
docker build -t johnniang/halo:project-structure .
# Test the Docker image
docker run -it --rm -p8090:8090 johnniang/halo:project-structure
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2730
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
重构项目结构
```
#### What type of PR is this?
/kind improvement
/area console
#### What this PR does / why we need it:
升级 FormKit 的版本到 0.16.2。
- https://formkit.com/changelog#0160-beta-16
#### Does this PR introduce a user-facing change?
```release-note
升级 Console 端的 FormKit 的版本到 0.16.2。
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。
#### Which issue(s) this PR fixes:
Fixes#3512
#### Special notes for your reviewer:
测试方式:
1. 安装任意一个编辑器插件,比如:https://github.com/halo-sigs/plugin-stackedit
1. 新建文章,选择安装的编辑器。
1. 发布文章。
1. 卸载或者停止编辑器。
1. 重新编辑刚刚创建的文章,如果提示 `未找到符合 markdown 格式的编辑器,请检查是否已安装编辑器插件` 则代表正常。
#### Does this PR introduce a user-facing change?
```release-note
修复在新建文章时,首次切换编辑器后没有设置内容 rawType 资源为对应编辑器类型的问题。
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
支持强制保存文章和单页面的设置,绕开后端 version 锁的机制,因为目前发现在后端 Reconcile 处理文章较慢时会影响文章的保存。
需要注意的是,这是一个不太合理的处理方式,但目前别无选择。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3339
#### Special notes for your reviewer:
测试方式:
1. 同时打开多个同文章的编辑页面的窗口。
2. 编辑任意一个窗口的文章设置。
3. 然后再去其他窗口保存,观察是否有异常。
#### Does this PR introduce a user-facing change?
```release-note
支持强制保存文章和页面的设置,避免因为 Version 锁的机制导致保存失败。
```
<!-- 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
/area core
<!--
添加其中一个类别:
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:
console 端登陆页使用自定义favicon
#### 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/3285
#### Special notes for your reviewer:
在`/actuator/globalinfo`暴露favicon信息,异步获取favicon信息,未获取到数据时浏览器短暂使用默认的`/console/favicon.ico`。
#### 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
console 端登陆页使用自定义favicon
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/area console
#### What this PR does / why we need it:
This PR creates AuthenticationWebFilter by ourselves instead of using FormLoginSpec directly. Because we have no chance to customize `org.springframework.security.web.server.authentication.ServerAuthenticationConverter` currently.
Meanwhile, we provide CryptoService(RSA) to generate key pair, get public key and decrypt message encrypted by public key.
There is a new endpoint to get public key which is used by console:
```bash
❯ curl localhost:8090/login/public-key -s | jq .
{
"base64Format": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouDtdDS751U8NcWfAAQ53ijEtkLnIHh1Thqkq5QHGslq2hBmWnNsIZFnc/bwVp00ImKLV2NtLgOuv5RRNS5iO+oqRvfOGdXLdW2nzqU2towtaMkYTEMJrsNMZp5BUNCGI7Z2xpPBZzvys0d1BvcpNFobX/LkOtcTyfB1DRp9ZAhxRYOZkTkCzaKo+6X11lnMexTsB3exzaXk9rRZ8XoJ+dWT5G0URs/PF2cDkgxuMdOFJzqDsb9HQYGI/etajdCcKs7mZsjmDgse9Cw9/3mgoTNnEGx9Wl89S0P+FJ7T5DALGt3/nSAlzmKdXJNBLf6Q44ogFpTWdq27JpJD3SKicQIDAQAB"
}
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3419
#### Does this PR introduce a user-facing change?
```release-note
支持登录时密码加密传输
```
#### What type of PR is this?
/kind feature
#### What this PR does / why we need it:
在 Console 端仪表盘的快捷访问中添加刷新搜索引擎索引的入口。

#### Special notes for your reviewer:
1. 测试仪表盘快捷访问中的刷新搜索引擎操作是否可以正常调用接口即可。
2. 分配一个不包含文章管理权限的角色给某个用户,检查是否可以看到这个刷新的入口。
#### 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:
为 springdoc 添加 `writer-with-order-by-keys` 参数以固定 OpenAPI 中接口的参数顺序,防止重新生成 `api-client` 时因为参数顺序不同而造成不必要的 diff。
#### Special notes for your reviewer:
测试方式:
1. 反复执行 `make -C console api-client-gen`
2. 观察是否有产生 diff
#### Does this PR introduce a user-facing change?
```release-note
None
```