Commit Graph

4528 Commits (767aa53a22a4f0d23bb76fcb16a9944f01388548)

Author SHA1 Message Date
Li e49baa1cf8
feat: add database endpoint for actuator (#3351)
#### What type of PR is this?
/kind feature

/milestone 2.3.x

#### What this PR does / why we need it:

#### Which issue(s) this PR fixes:

Fixes #3263

#### Special notes for your reviewer:
测试方法:
1. 使用超级管理员登录
2. 查看接口 /actuator/info 查看是否存在 database 字段。
#### Does this PR introduce a user-facing change?


```release-note
NONE
```
2023-02-21 03:06:10 +00:00
John Niang 7e09cdcbf0
Refine problem detail when plugin is already installed (#3350)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

This PR refines problem detail of PluginAlreadyExistsException. Please note the new type `https://halo.run/probs/plugin-alreay-exists` and additional property `pluginName` of problem detail.

Meanwhile 

- Before

    ```json
    {
      "type": "about:blank",
      "title": "Plugin Already Exists Error",
      "status": 400,
      "detail": "Plugin PluginCommentWidget already exists.",
      "instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
      "requestId": "880fe8cd-5",
      "timestamp": "2023-02-20T10:17:21.541104Z"
    }
    ```

- After

    ```json
    {
      "type": "https://halo.run/probs/plugin-alreay-exists",
      "title": "Plugin Already Exists Error",
      "status": 400,
      "detail": "Plugin PluginCommentWidget already exists.",
      "instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
      "pluginName": "PluginCommentWidget",
      "requestId": "880fe8cd-5",
      "timestamp": "2023-02-20T10:17:21.541104Z"
    }
    ```
#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3164

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
优化插件重复安装错误提示。
```
2023-02-21 02:28:11 +00:00
28f631fec5 fix: hide the ghost user from the user list (halo-dev/console#866)
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
```
2023-02-20 13:14:20 +00:00
Ryan Wang 1b97167b29 feat: add supports for download log file in actuator page (halo-dev/console#867)
#### 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/3188

#### Screenshots:

<img width="1676" alt="image" src="https://user-images.githubusercontent.com/21301288/220023373-44616cd3-b42a-466a-a928-9abce78cc16d.png">

#### Special notes for your reviewer:

测试方式:

1. 进入系统概览页面,点击运行日志的下载按钮。
2. 检查是否成功下载了日志文件。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的系统概览页面支持下载运行日志。
```
2023-02-20 08:00:20 +00:00
Li db4142787e
feat: open actuator logfile endpoint for prod (#3345)
<!--  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 feature
<!--
添加其中一个类别:
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:

<!--
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 #3188 

#### Special notes for your reviewer:
测试方式:
1. 使用 prod 模式启动项目,使用超级管理员登陆
2. 访问 /actuator/logfile 查看是否有日志显示。

#### 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
```
2023-02-20 07:34:18 +00:00
Ryan Wang c54c00fce1 perf: default editor's toc supports showing empty states (halo-dev/console#864)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

默认编辑器的大纲在没有内容的时候支持显示空状态的提示。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3335

#### Screenshots:

<img width="1420" alt="image" src="https://user-images.githubusercontent.com/21301288/220002675-e16829f0-1c33-4030-a76b-4720dc7d7a69.png">

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
Console 端默认编辑器的大纲列表支持显示空状态
```
2023-02-20 06:30:18 +00:00
7c075dc5d7
Add custom endpoint for listing user conditionally (#3320)
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

为后端用户管理提供更多筛选接口,包括关键词、角色、创建时间排序

#### Which issue(s) this PR fixes:

Fixes #3290

```release-note
NONE
```
2023-02-20 04:18:18 +00:00
Ryan Wang dd5c5a5bcb feat: user management supports conditional filtering and sorting (halo-dev/console#862)
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

用户管理列表支持条件筛选和排序,适配:https://github.com/halo-dev/halo/pull/3320

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3290

#### Screenshots:

<img width="922" alt="image" src="https://user-images.githubusercontent.com/21301288/219578426-de396dfb-7ece-496e-b740-d7a36321eafb.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3320 分支。
2. Console 需要 `pnpm build:packages`
3. 测试用户管理的关键词、条件、排序筛选是否工作正常。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的用户列表支持条件筛选和排序。
```
2023-02-20 04:18:18 +00:00
Ryan Wang 4fe31cbdcd feat: add supports for preview audio and video file in attachment detail (halo-dev/console#841)
#### 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/1923

#### Screenshots:

<img width="1011" alt="image" src="https://user-images.githubusercontent.com/21301288/217746883-92c46d4e-a51d-4b53-ae8e-f647a47b216f.png">
<img width="1010" alt="image" src="https://user-images.githubusercontent.com/21301288/217746922-9b014974-71aa-4d54-aa42-be2ae03647a1.png">


#### Special notes for your reviewer:

测试方式:

1. 上传若干视频和音频文件,检查是否可以正常播放即可。


可供测试的文件:[音视频测试.zip](https://github.com/halo-dev/console/files/10694553/default.zip)

#### Does this PR introduce a user-facing change?

```release-note
Console 端的附件详情支持预览音视频文件。
```
2023-02-17 07:50:13 +00:00
Ryan Wang 11dffceab6 feat: add layer-closeable prop for modal (halo-dev/console#861)
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

VModal 组件支持设置是否允许点击蒙层以关闭模态框,并将所有包含表单的模态框设置为不允许点击蒙层关闭。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3328

#### Screenshots:

![2023-02-17 12 08 56](https://user-images.githubusercontent.com/21301288/219547318-d7c59742-8546-4bc8-9d49-fcff4053602f.gif)


#### Special notes for your reviewer:

测试方式:

1. 打开 Console 端任意一个表单模态框,测试点击表单外部区域是否会关闭弹框。

#### Does this PR introduce a user-facing change?


```release-note
优化 Console 端部分包含表单的模态框,默认不允许点击外部区域关闭模态框。
```
2023-02-17 06:52:13 +00:00
Ryan Wang a00a302554 chore: adjust the log level and delete useless logs (halo-dev/console#860)
#### 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
```
2023-02-17 06:36:15 +00:00
Ryan Wang 497e79cb08 chore: move @halo-dev/api-client package to console (halo-dev/console#854)
#### 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
```
2023-02-17 06:30:13 +00:00
Ryan Wang 8d4fffb277 perf: improve error message of login (halo-dev/console#851)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

改进登录异常的提示信息,目前大致分为三种:

1. 用户名或密码错误
2. 跨域或网络请求异常
3. CSRF Token 失效

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3291

#### Screenshots:

<img width="1402" alt="image" src="https://user-images.githubusercontent.com/21301288/218319203-19517ab7-7740-41f9-8579-f10a60aa6e51.png">
<img width="1673" alt="image" src="https://user-images.githubusercontent.com/21301288/218319221-2fc332f4-4de7-4417-a277-0c4a396d6389.png">


#### Special notes for your reviewer:

测试方式:

1. 进入浏览器控制台清理 Cookie,以测试 CSRF Token 失效的情况。
2. 使用 3000 端口访问 Console,以测试跨域的情况。
3. 观察以上两种情况的登录请求异常提示信息是否符合要求。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端登录请求异常的提示
```
2023-02-17 06:28:18 +00:00
guqing 3cde340b71
fix: route for the tag is not registered when halo starts (#3322)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.3.x

#### What this PR does / why we need it:
1. 去掉原 TagReconciler 的 requeue 逻辑,来临时解决大量 tag 时 reconciler 空转导致 cpu 下不来的问题,参考: https://github.com/halo-dev/halo/issues/3311
2. 增加 TagRouteReconciler 在启动时注册路由

#### Which issue(s) this PR fixes:
Fixes #3321

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?
```release-note
修复 #3316 引入的 tags 标签的路由没有注册的问题
```
2023-02-15 13:52:12 +00:00
Ryan Wang dd161eec19
perf: disable syncAllOnStart for tag reconciler (#3316)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

暂时禁用 Tag Reconciler 在启动的时候同步。(临时解决方案)

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3312

#### Does this PR introduce a user-facing change?


```release-note
禁用系统启动时同步标签文章数的功能
```
2023-02-15 10:16:12 +00:00
Ryan Wang e9970b203a perf: mute the fetch roles request (halo-dev/console#857)
#### 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
```
2023-02-15 09:08:11 +00:00
guqing e71b79b1cf
refactor: status update when setting not found (#3314)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
状态更新时检查是否与之前状态相同,目前先这样解决后续等 status 的 update 出来以后再重构一下 plugin 的 status 结构。

测试:
测试插件在开发模式和生产模式下填写 settingName 后有/无对应 settingName 资源的插件启动情况,看 PluginReconciler 出错时是否很快
步骤:
1. 开发模式下,插件的 plugin.yaml 配置了 settingName 但没有创建名称为 settingName 对应的 Setting 资源看插件启动时控制台是否出现很快的错误日志,期望出现错误的时间间隔会逐渐变长。
2. 与步骤一相同,但 settingName 对应有 Setting 模型的 yaml,期望插件正常启动且能保存配置
3. 生产模式启动插件重复步骤 1 和 2

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?
```release-note
None
```
2023-02-15 07:30:20 +00:00
longjuan 9dee9b0409
fix: incorrect number of comments (#3295)
<!--  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
/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:
Fixed incorrect number of comments after comment deletion.
#### 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/3287

#### 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
修复删除评论后Console端文章和单页评论数量不正确
```
2023-02-15 06:52:12 +00:00
Ryan Wang fce581bd2d fix: the issue that role display name (halo-dev/console#847)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

为系统初始化的角色添加显示名称

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3257

#### Screenshots:

<img width="1668" alt="image" src="https://user-images.githubusercontent.com/21301288/218020794-696420c4-69bb-4422-9409-482bb2aff708.png">


#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到:https://github.com/halo-dev/halo/pull/3280
2. 检查 Console 端显示的系统角色是否正常。
3. 新建若干自定义角色,检查名称是否正常。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端用户角色标识的显示名称。
```
2023-02-15 05:58:12 +00:00
John Niang 5f7ea18f7c
Auto rename attachment if it exists (#3305)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

#### What this PR does / why we need it:

Before this PR, halo will throw an FileAlreadyExists exception if users upload file which already exists.

But now, we will rename the attachment automatically on filename conflict. e.g.:

```bash
halo.run -> halo-xyz.run
.run -> xyz.run
halo -> halo-xyz
```

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3218

#### Special notes for your reviewer:

![image](https://user-images.githubusercontent.com/16865714/218670068-87389289-1248-48e8-82a4-1bcf939e64e3.png)

#### Does this PR introduce a user-facing change?

```release-note
附件已存在时自动重命名
```
2023-02-15 05:38:12 +00:00
e485acef66
perf: associate ghost user with posts on user deletion. (#3293)
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

文章发布用户被删除后,设置这篇文章的发布人为Ghost

#### Which issue(s) this PR fixes:

Fixes #3265

```release-note
NONE
```
2023-02-15 05:36:14 +00:00
Ryan Wang 93dc2f59be perf: improve word-break style for comment content (halo-dev/console#852)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

修复评论管理中内容文字过长导致样式异常的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3294

#### Screenshots:

before:

<img width="1016" alt="image" src="https://user-images.githubusercontent.com/21301288/218379816-73a39f13-32f7-40a8-a65d-9e7f6f691f71.png">

after:

<img width="1416" alt="image" src="https://user-images.githubusercontent.com/21301288/218379719-f86193c0-d6d7-4aa6-ad5c-d538c215e80b.png">

#### Does this PR introduce a user-facing change?


```release-note
修复 Console 的评论管理中内容文字过长导致样式异常的问题。
```
2023-02-13 08:30:20 +00:00
Ryan Wang 09d097a193 chore: add @LIlGG to reviewers list (halo-dev/console#850)
#### 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
```
2023-02-13 03:48:18 +00:00
Ryan Wang da43031de2 perf: improve the indexing threshold for the fuse search engine (halo-dev/console#849)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化 Console 端使用 fuse.js 搜索引擎的搜索阈值,解决搜索关键词匹配的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3289

#### Screenshots:

before:

![image](https://user-images.githubusercontent.com/21301288/218301830-9cc0ac6e-994c-4994-9701-28e50cc90fa3.png)

after:

<img width="676" alt="image" src="https://user-images.githubusercontent.com/21301288/218301848-0883bbe7-f2ad-4ccb-8802-74920d76ebe0.png">


#### Special notes for your reviewer:

测试方式:

1. 检查 Console 端全局搜索,以及用户/权限管理的搜索是否符合预期。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端全局搜索的匹配规则。
```
2023-02-13 03:46:22 +00:00
Ryan Wang 6963167a61 chore: fix lint issue (halo-dev/console#848)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

移除未使用的导入和变量。

<img width="824" alt="image" src="https://user-images.githubusercontent.com/21301288/218025655-d5da2012-fe78-4bfe-9138-3015e97a25e4.png">

#### Does this PR introduce a user-facing change?


```release-note
None
```
2023-02-13 03:44:26 +00:00
Ryan Wang 26f29b20c7
chore: add @LIlGG to reviewers list (#3292)
#### 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
```
2023-02-13 01:48:18 +00:00
Ryan Wang 3de9f7f80e
perf: refine display name of system default role (#3280)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

为系统初始化的角色添加显示名称

#### Which issue(s) this PR fixes:


Fixes https://github.com/halo-dev/halo/issues/3257

#### Screenshots:

<img width="1668" alt="image" src="https://user-images.githubusercontent.com/21301288/218020794-696420c4-69bb-4422-9409-482bb2aff708.png">


#### Special notes for your reviewer:

see 

#### Does this PR introduce a user-facing change?

```release-note
为系统初始化的角色添加显示名称
```
2023-02-10 08:38:16 +00:00
guqing e9389ac1d8
refactor: lru cache key for template engine manager (#3243)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x

#### What this PR does / why we need it:
修改 TemplateEngineManager 中 LRU cache 的缓存 key
see #3242 for more details.

#### Which issue(s) this PR fixes:
Fixes #3242

#### Special notes for your reviewer:
how to test it?
1. 安装几个主题测试预览功能是否正常
2. 特别关注激活主题的预览,激活主题的预览和激活主题直接访问使用的不同的 TemplateEngine

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?
```release-note
None
```
2023-02-10 07:40:15 +00:00
Ryan Wang 411ca714c6 perf: hide anonymousUser in user management list (halo-dev/console#844)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

在用户管理列表隐藏 anonymousUser 用户,anonymousUser 暂时没有实际用途。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2775#issuecomment-1425129852

#### Screenshots:

<img width="1410" alt="image" src="https://user-images.githubusercontent.com/21301288/217997078-5e2e0724-5f22-45dc-a9c6-ee42254c9bd7.png">


#### Special notes for your reviewer:

测试方式:

1. 进入 Console 的用户管理,检查是否有名为 Anonymous User 的用户即可。

#### Does this PR introduce a user-facing change?

```release-note
在 Console 端的用户管理中隐藏 `Anonymous User` 用户。
```
2023-02-10 04:32:15 +00:00
longjuan ffca4e195b fix: menu scroll bar is blocked (halo-dev/console#845)
#### 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 https://github.com/halo-dev/halo/issues/3272

#### Screenshots:
![image](https://user-images.githubusercontent.com/28662535/217997111-36676220-b539-417d-b606-a1fe336c9474.png)
![image](https://user-images.githubusercontent.com/28662535/217997152-165bb976-8cfa-480a-b27a-6478c2bad568.png)
![image](https://user-images.githubusercontent.com/28662535/217997216-820de8fb-9526-4e23-9fec-17e8f2e8ebab.png)

#### Special notes for your reviewer:
分为logo、可滚动(搜索、菜单)、用户信息三部分,不妥就关闭这个PR吧
#### Does this PR introduce a user-facing change?

```release-note
完整显示左侧菜单栏滚动条
```
2023-02-10 04:26:15 +00:00
Ryan Wang 2aa80cfffd
docs: update readme (#3256)
#### What type of PR is this?

/kind documentation

#### What this PR does / why we need it:

更新产品的一句话定位。

```release-note
None
```
2023-02-10 02:46:14 +00:00
findwinds 56aa7de85a
Fix random list problem of tags and categories (#3261)
<!--  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:
replaced flatMap with flatMapSequential to ensure that the list of tags and categories shown in console post order is not random

#### 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 #3139

#### Special notes for your reviewer:
/cherrypick release-2.0
/cherrypick release-2.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
修复控制台文章列表中,标签和分类顺序随机的问题
```
2023-02-09 04:24:13 +00:00
guqing 7453b93b1d
fix: default value cannot be read when the setting is not created because of asynchrony (#3236)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
/cherry-pick release-2.2
#### What this PR does / why we need it:
修复插件安装时有几率出现设置没有默认值导致无法保存的问题

see https://github.com/halo-dev/halo/issues/3224#issuecomment-1418825809 for more details

#### Which issue(s) this PR fixes:

Fixes #3224

#### Special notes for your reviewer:
how to test it?
1. 安装 https://github.com/halo-sigs/plugin-feed 插件并立即启用(或以开发模式)
2. 到此插件设置**始终**能查询到默认值并且能保存

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
修复插件安装时有几率出现设置没有默认值导致无法保存的问题
```
2023-02-08 07:16:13 +00:00
Ryan Wang d0acbee6dd perf: improve usage of the card component in some pages (halo-dev/console#839)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化部分页面 VCard 组件的用法,修复样式问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3226

#### Screenshots:

before:

<img width="1417" alt="image" src="https://user-images.githubusercontent.com/21301288/217179383-d1dff4f5-4350-4881-aed6-c6bf2cc184c5.png">

after:

<img width="1430" alt="image" src="https://user-images.githubusercontent.com/21301288/217179173-f61cf787-f34f-43a3-88c3-08fac6c31879.png">

#### Special notes for your reviewer:

测试方式:

1. 检查主题详情页面、插件详情页面、系统设置页面的内容区域,底部的圆角是否生效。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端主题详情、插件详情、系统设置中卡片组件的样式。
```
2023-02-08 06:24:13 +00:00
Ryan Wang 0260b0265f perf: fix CLS issue of actuator page (halo-dev/console#840)
#### 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 端进入系统概览页面会抖动的问题。
```
2023-02-07 08:16:12 +00:00
guqing 6809dbb251
fix: plugin status check to prevent inconsistent status (#3235)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
#### What this PR does / why we need it:
当开发模式启动时上传 JAR 运行插件会出现插件不存在的异常,但由于 PluginReconciler 中检查状态不一致后 return 在 optional 语句中只是让当前 optional 后面的代码停止执行,还会继续执行 optional 外面的代码导致 status 的异常信息不一致,进而 object equals 始终为 false 而无法让 reconciler 终止运行导致循环。

此 PR 调整了一下代码位置,进入 reconciler 时先进行检查,如果不满足则不执行后面的代码同时将信息写入 plugin.status 让用户知晓。

此问题是修改了 Reconciler 判断逻辑后出现的 https://github.com/halo-dev/halo/pull/3210 ,因此不影响之前的代码只针对当前 2.3.x

#### Special notes for your reviewer:
how to test it?
1. 模拟一个插件找不到的错误场景例如以生产模式启动插件但配置 fixed-plugin 指定为插件项目目录
2. 启动 Halo 看 Reconciler 是否会一直在控制台输出日志
3. 卸载它能成功

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-02-07 07:10:14 +00:00
John Niang df9b04c4d5
Reduce the number of queries to resolve theme (#3238)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

Save ThemeContext into ServerWebExchange to reduce the number of queries to resolve theme from 2(or 3) to 1.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3162

#### Does this PR introduce a user-facing change?

```release-note
优化查询主题的查询次数
```
2023-02-07 06:40:12 +00:00
infanx 83436770fd fix: the width of the code input type is not full (halo-dev/console#838)
#### 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 输入框宽度未占满的问题
```
2023-02-07 06:04:12 +00:00
John Niang df97ee8629
Refine exception message of duplicate key (#3219)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

#### What this PR does / why we need it:

I create another exception `DuplicateNameException` to map `org.springframework.dao.DuplicateKeyException` when creating extensions.

See https://github.com/halo-dev/halo/issues/3180 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3180

#### Special notes for your reviewer:

1. Try to create an user which name has already exist
2. See the error

#### Does this PR introduce a user-facing change?

```release-note
优化名称重复的错误提示
```
2023-02-03 09:50:11 +00:00
longjuan 29b55acd78 fix: native login box pops up when the session expires (halo-dev/console#836)
<!--  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
防止浏览器弹出原生登录框
```
2023-02-03 08:06:11 +00:00
John Niang 4636990d5c
Fix the problem that publishing post always fails (#3210)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

#### What this PR does / why we need it:

1. Refactor Queue in Controller. I add dirty set of request to avoid lost of new request from other places instead of reconciler.
2. Enhance equals and hashcode methods to ensure we can ignore updates of same extensions.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2860

#### Special notes for your reviewer:

Please take some time to test publishing posts.

#### Does this PR introduce a user-facing change?

```release-note
修复发布文章时经常出现错误的问题
```
2023-02-02 12:16:10 +00:00
guqing 0fd023b8f6
fix: plugin disappeared after plugin with same name reinstalled (#3198)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.2.x

#### What this PR does / why we need it:
修复重复安装插件时 JAR 文件被删除的问题

需要注意的场景:
prod 模式下,假如安装一个 sitemap 插件,版本为 1.0.0 ,而此时 plugins 目录已经存在同名文件 sitemap-1.0.0.jar 文件但 sitemap 的 plugin.yaml 没有被持久化过,则能正常安装,旧的 JAR 文件被覆盖。

see #3159 for more details
#### Which issue(s) this PR fixes:

Fixes #3159

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?

```release-note
修复重复安装插件时 JAR 文件被删除的问题
```
2023-02-02 02:44:11 +00:00
John Niang 764b664fd8
Bump Halo version to 2.3.0-SNAPSHOT for main branch (#3201)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Bump Halo version to 2.3.0-SNAPSHOT and update README.md

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-02-01 08:04:09 +00:00
Ryan Wang 47e1bea2f2 chore: release 2.2.0 (halo-dev/console#835)
#### 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
```
2023-02-01 02:52:10 +00:00
Ryan Wang ef687542b7 feat: default editor supports pasting or dragging pictures to upload (halo-dev/console#825)
#### 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 端的默认编辑器支持拖拽或者粘贴图片上传
```
2023-02-01 02:50:10 +00:00
Ryan Wang 6044001c9b fix: theme page cannot be opened after the development environment is initialized (halo-dev/console#833)
#### 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
```
2023-02-01 02:48:10 +00:00
John Niang 0c18fb3ec4
Fix the problem of not initializing default theme correctly (#3194)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.2.x

#### What this PR does / why we need it:

Make requires field of Theme not required.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3177

#### Special notes for your reviewer:

1. Clear Halo working directory
2. Start Halo freshly

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-01-31 14:18:10 +00:00
Ryan Wang 3f5ca2b39f chore: bump @halo-dev/richtext-editor to supports more feature about media (halo-dev/console#834)
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

升级默认编辑器版本,改动请查阅:

1. https://github.com/halo-sigs/richtext-editor/pull/4
2. https://github.com/halo-sigs/richtext-editor/pull/3
3. https://github.com/halo-sigs/richtext-editor/pull/2

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
升级 Console 端默认编辑器版本,以支持图片位置和大小设置、插入音视频等功能。
```
2023-01-31 14:10:09 +00:00
John Niang c079762f65
Upgrade Lucene to 9.5.0 (#3190)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.2.x

#### What this PR does / why we need it:

See https://lucene.apache.org/core/9_5_0/MIGRATE.html for more.

#### Special notes for your reviewer:

Please confirm that the search widget is working fine.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Lucene 至 9.5.0
```
2023-01-31 07:14:09 +00:00
John Niang f851b1ba53
Upgrade pf4j to 3.9.0 (#3191)
#### What type of PR is this?

/kind imporvement
/area core
/milestone 2.2.x

#### What this PR does / why we need it:

See 2d3cf24fed/CHANGELOG.md (390---2023-01-30) for more.

#### Special notes for your reviewer:

Please confirm that the plugin module is working fine.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 PF4J 至 3.9.0
```
2023-01-31 06:10:10 +00:00