#### 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 cleanup
/area core
#### What this PR does / why we need it:
Move common classes related to theme into api module.
#### 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
/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 core
#### What this PR does / why we need it:
Move `defaultHandler#onAuthenticationSuccess` up to response write, or it will be executed always.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3553
#### Special notes for your reviewer:
Try to login and see the log detail.
#### Does this PR introduce a user-facing change?
```release-note
修复登录成功或失败后报错的问题
```
#### 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 cleanup
/area core
#### What this PR does / why we need it:
- Bump up version to 2.5.0-SNAPSHOT for next development
- Update README.md
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
#### What this PR does / why we need it:
Upgrade to plugin-comment-widget 1.5.0.
#### 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:
修改 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 core
/milestone 2.4.0
#### What this PR does / why we need it:
移除 AuthProviderReconciler 中关于 authProvier 数据被删除时禁用它提供的登录方式的逻辑
当第三方登录插件如 plugin-oauth2 被停止时不应该从已启用的登录配置中移除 auth provider name,这会导致插件被停用在启用后需要重新启用登录方式。
之前之所以如此是想着去掉 system configmap 中的配置残余,虽然现在去掉了 Reconciler 但为了确保数据干净或许还得想其他办法来解决它,但目前不是重点也没有一个很好的办法,或许可以在插件中去做,比如当插件被卸载的生命周期方法中去更新 ConfigMap 中关于此项的配置。
#### 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?
/area core
/kind improvement
/milestone 2.4.0
#### What this PR does / why we need it:
将系统设置中的用户注册的默认角色输入框改为选择框。
<img width="575" alt="image" src="https://user-images.githubusercontent.com/21301288/228888394-8355b71e-7d18-46bf-b177-569fa7b311d6.png">
#### 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 core
/milestone 2.4.0
#### What this PR does / why we need it:
当用户被删除时关联删除用户的绑定账号信息
how to test it?
1. 创建用户
2. 绑定账号
3. 使用管理员删除此用户并查看关联的 UserConnection 是否被删除
```shell
curl -u 'your-username:your-password' http://127.0.0.1:8090/apis/auth.halo.run/v1alpha1/userconnections | jq -r '.'
```
#### Which issue(s) this PR fixes:
Fixes#3639
#### 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 输入类型。
#### 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 feature
/area core
/milestone 2.4.x
#### What this PR does / why we need it:
修复 Local 认证方式的开关初始化状态为关闭
#### Which issue(s) this PR fixes:
Fixes#3602
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.4.x
/area core
#### What this PR does / why we need it:
提供 ReactiveSettingFetcher 供插件获取配置
此 PR 基于原有的阻塞的 SettingFetcher 逻辑挪到 DefaultReactiveSettingFetcher 中并将阻塞的实现用 Reactive 得代理,不需要测试,单元测试过了即可。
可以尝试在插件中依赖注入 ReactiveSettingFetcher 看是否能正确注入
#### Which issue(s) this PR fixes:
Fixes#3620
#### Does this PR introduce a user-facing change?
```release-note
提供 ReactiveSettingFetcher 供插件获取配置
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.4.x
#### What this PR does / why we need it:
修复升级主题或插件时新增加的配置默认值没有更新的问题
how to test it?
1. 安装包含设置的主题后获取主题的 ConfigMap 并记下
2. 修改(增加/更新)主题的设置(Setting)的默认值,模拟更新主题
3. 期望默认值改变不会影响到之前已有的配置,对于新增加的配置的默认值会被合并到已有的 ConfigMap 中
#### Which issue(s) this PR fixes:
Fixes#3446
#### 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 feature
/area core
#### What this PR does / why we need it:
This PR provides a configuration item to control referrer-policy header. Default is `strict-origin-when-cross-origin`.
```yaml
halo:
security:
referrer-options:
policy: no-referrer
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3064
#### Does this PR introduce a user-facing change?
```release-note
提供配置以控制站点引用策略(Referrer-Policy)
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
This PR makes extension initialization before starting reconcilers to prevent modification conflicts.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3601
#### Special notes for your reviewer:
1. Try to run Halo 2.3.2 with command `docker run --rm -it -v ~/halo2-dev:/root/.halo2 -p 8090:8090 halohub/halo:2.3.2`
2. Then run Halo 2.4.0-SNAPSHOT with dev profile.
```bash
./gradlew bootRun --args="--spring.profiles.active=dev"
```
4. Check logs and logging functionality
5. Repeat steps above
#### 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 cleanup
/area core
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/issues/3600 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3600
#### Special notes for your reviewer:
We can follow the commands below to test it:
```bash
# Start up MariaDB
docker run -d --env MARIADB_USER=halo -p 3306:3306 --env MARIADB_PASSWORD=mariadb --env MARIADB_ROOT_PASSWORD=mariadb -e MARIADB_DATABASE=halo mariadb:latest
# Start up Halo
make -C console dev
./gradlew bootRun --args="--spring.profiles.active=dev,mariadb"
```
#### 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
升级至 MariaDB R2DBC connector 1.1.4
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
升级默认主题的版本为 1.2.1:https://github.com/halo-dev/theme-earth/releases/tag/v1.2.1
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.4.x
/area core
#### What this PR does / why we need it:
支持聚合多个角色到一个角色
see #3560 for more details.
how to test it?
创建一个测试角色和和一个 RoleBinding 将此角色的绑定到其他角色,在不修改用户权限的情况下,用户将拥有新创建的测试角色的权限。
#### Which issue(s) this PR fixes:
Fixes#3560
#### Does this PR introduce a user-facing change?
```release-note
支持聚合多个角色到一个角色
```
#### 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 feature
/milestone 2.4.x
/area core
#### What this PR does / why we need it:
提供 Secret 自定义模型用于存储敏感数据
例如:密码、token 等
参考自: https://kubernetes.io/docs/concepts/configuration/secret
#### Which issue(s) this PR fixes:
Fixes#3267
#### Does this PR introduce a user-facing change?
```release-note
提供 Secret 自定义模型用于存储敏感数据
```