Commit Graph

1581 Commits (c03ea64bf25de1b4b573627e86f6323f00ae861e)

Author SHA1 Message Date
Ryan Wang c03ea64bf2
feat: provide Chinese translation for the system's role template (#870)
#### 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/2848

#### Screenshots:

<img width="1414" alt="image" src="https://user-images.githubusercontent.com/21301288/220069394-6af6922b-28b2-4818-ab58-dcfb69b6b53b.png">


#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 检查角色详情页面和新建页面的角色模板描述是否为中文。

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

```release-note
Console 端为系统内提供的角色模板提供中文翻译
```
2023-02-21 05:16:10 +00:00
Ryan Wang d396337d55
perf: add supports for storing navbar position (#865)
#### 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/3240

#### Screenshots:

before:

![2023-02-20 12 12 05](https://user-images.githubusercontent.com/21301288/220007834-12658cf2-e8a8-42ea-93b1-2c58419edbac.gif)


after:

![2023-02-20 12 11 19](https://user-images.githubusercontent.com/21301288/220007742-58471b69-cfd1-4576-babd-5516d2c0de1d.gif)


#### Special notes for your reviewer:

测试方式:

1. 调整浏览器高度,让侧边栏菜单区域出现滚动条。
2. 测试点击底部的任意菜单项,跳转页面之后,观察滚动条是否与之前的位置保持一致。

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


```release-note
Console 端侧边栏滚动条支持缓存位置,防止切换路由时重置滚动条位置。
```
2023-02-21 03:56:10 +00:00
Ryan Wang cf34b86540
perf: improve the layout of post tags (#869)
#### 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/2926
Fixes https://github.com/halo-dev/halo/issues/3301

#### Screenshots:

<img width="1408" alt="image" src="https://user-images.githubusercontent.com/21301288/220048436-aed6e0b1-8fc7-4365-98c9-db4aef29205e.png">

#### Special notes for your reviewer:

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

```release-note
优化 Console 端文章管理的标签布局
```
2023-02-21 03:46:10 +00:00
Ryan Wang 43702ed126
feat: add supports for display database info in actuator page (#872)
#### 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/3263

#### Screenshots:

<img width="1413" alt="image" src="https://user-images.githubusercontent.com/21301288/220119998-dcf58a6e-cbe5-46ed-9fda-67d0ce5b85c1.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3351 分支。
2. 进入系统概览页面,检查是否有数据库信息。

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

```release-note
Console 端的系统概览页面支持显示数据库信息
```
2023-02-21 03:36:10 +00:00
Ryan Wang 4dd9592748
feat: prompt to upgrade plugin when installing existing plugin (#871)
#### 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/3164

#### Screenshots:

<img width="1411" alt="image" src="https://user-images.githubusercontent.com/21301288/220118697-12fbd7a7-57e6-47bb-a03b-b9c280571687.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3350 分支。
2. 在插件为 deployment 模式下启动 Halo。
3. 安装任意一个插件,然后继续上传安装相同插件。
4. 观察是否提示升级此插件。

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

```release-note
Console 端安装已存在插件时,支持提示并升级插件。
```
2023-02-21 03:14:09 +00:00
56e7c2f379
fix: hide the ghost user from the user list (#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 7b3007ec9f
feat: add supports for download log file in actuator page (#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
Ryan Wang 2705fc35d0
perf: default editor's toc supports showing empty states (#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
Ryan Wang 194ff7f4ad
feat: user management supports conditional filtering and sorting (#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 87d7592b29
feat: add supports for preview audio and video file in attachment detail (#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 c8dbd2422c
feat: add layer-closeable prop for modal (#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 fad0dcc3ba
chore: adjust the log level and delete useless logs (#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 b949a25558
chore: move @halo-dev/api-client package to 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 1ded5be45d
perf: improve error message of login (#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
Ryan Wang fe353a472f
perf: mute the fetch roles request (#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
Ryan Wang aca67f683c
fix: the issue that role display name (#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
Ryan Wang 381c3e2484
perf: improve word-break style for comment content (#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 5315a0d429
chore: add @LIlGG to reviewers list (#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 8209e1497e
perf: improve the indexing threshold for the fuse search engine (#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 047e221ed6
chore: fix lint issue (#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 7320aa1592
perf: hide anonymousUser in user management list (#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 3724a45889
fix: menu scroll bar is blocked (#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 b83d3e4279 perf: improve usage of the card component in some pages (#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 db2fe142a6
perf: fix CLS issue of actuator page (#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
infanx 47d2b819eb
fix: the width of the code input type is not full (#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
longjuan 73ca550213
fix: native login box pops up when the session expires (#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
Ryan Wang 561b8da237
chore: release 2.2.0 (#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 8f6d543f4d
feat: default editor supports pasting or dragging pictures to upload (#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 658a8ce4ee
fix: theme page cannot be opened after the development environment is initialized (#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
Ryan Wang d51713ec27
chore: bump @halo-dev/richtext-editor to supports more feature about media (#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
Ryan Wang 21530d309e
feat: add actuator view page (#832)
#### What type of PR is this?

/kind feature

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

添加 Actuator 信息查看页面。适配 https://github.com/halo-dev/halo/pull/3182

todo:

- [x] 页面入口

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

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

#### Screenshots:

![image](https://user-images.githubusercontent.com/21301288/215386617-e3aafc6d-777d-49e8-93c9-b9432623e98e.png)


#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3182 分支。
2. Console 需要 `pnpm build:packages`
3. 访问 http://localhost:8090/console#/actuator

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

```release-note
Console 端添加系统信息查看页面
```
2023-01-31 03:24:09 +00:00
Ryan Wang 6c7b48b086
refactor: change api of fetching post and singlepage content (#828)
#### 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
```
2023-01-31 02:52:09 +00:00
Ryan Wang 4c8bb05c31
feat: add supports for automatic slug generation (#831)
#### 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 端的文章、独立页面、分类、标签支持自动生成别名
```
2023-01-30 06:52:11 +00:00
Ryan Wang 62f8e2e703
refactor: use new apis to refactor plugins management (#824)
#### 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 端插件的设置表单逻辑。
```
2023-01-30 06:38:12 +00:00
Ryan Wang ab888119ef
refactor: use new apis to refactor themes management (#820)
#### 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 端主题的设置表单逻辑。
```
2023-01-30 06:36:10 +00:00
BugKing a2935de6ef
fix: add word break for long toast body (#829)
#### 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/3163

#### Screenshots:

![image](https://user-images.githubusercontent.com/27671436/213079369-0c5db4cf-fa3d-44a3-bd53-d98ae79a6bcf.png)

#### Special notes for your reviewer:

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

```release-note
fix: add word break for long toast body
```
2023-01-19 08:58:14 +00:00
Airbo ZH 397e050010
fix: use comment.metadata.name instead of index as the key of comments list (#830)
<!--  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 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:
修复后台删除评论后会导致下方头像错误的bug
#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3170
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->


#### Screenshots:
![becd4362a1064b5cba0a26298df8d8e](https://user-images.githubusercontent.com/50261327/213245296-c304bd40-2a1c-4e10-a7b0-7160fd0ac259.png)
![96585c0a721ffed8be07781b0dd612c](https://user-images.githubusercontent.com/50261327/213245315-e7f7ac1b-a4f0-4d33-9ba3-0c0b6b3c7259.png)

<!--
如果此 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:

#### 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
修复后台删除评论后会导致下方头像错误的bug
```
2023-01-19 04:06:14 +00:00
Ryan Wang 0fa6909a8f
feat: update theme requires field and supports show failed message (#826)
#### What type of PR is this?

/kind feature

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

修改主题的 `spec.require` 字段为 `spec.requires`,以及支持显示错误信息。适配:https://github.com/halo-dev/halo/pull/3150

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

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

#### Screenshots:

<img width="1692" alt="image" src="https://user-images.githubusercontent.com/21301288/212800478-0fe53ae8-4e31-4810-89aa-4b06d1b700fb.png">
<img width="1056" alt="image" src="https://user-images.githubusercontent.com/21301288/212800550-7edd7c0a-564c-4df4-baee-b3ffe6b3352d.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 切换到 https://github.com/halo-dev/halo/pull/3150 分支。
2. Console 需要 `pnpm install`。
3. 修改主题的 `spec.requires`,根据 https://github.com/halo-dev/halo/pull/3150 中的测试条件修改这个值。
4. 检查是否可以显示异常版本信息。

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

```release-note
Console 端支持显示主题的版本异常信息
```
2023-01-19 02:58:14 +00:00
Ryan Wang dd4ab873c1
perf: change attachment list layout to list mode (#827)
#### 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/3167

#### Screenshots:

<img width="1692" alt="image" src="https://user-images.githubusercontent.com/21301288/212832865-f1f22ce2-860f-497a-b091-b4552458bd77.png">


#### Special notes for your reviewer:

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


```release-note
Console 附件管理的默认视图模式改为列表模式。
```
2023-01-18 09:40:15 +00:00
Ryan Wang 04819c12a8
perf: improve plugin loading (#823)
#### What type of PR is this?

/kind improvement

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

优化 Console 端加载插件资源的逻辑。

1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
2. 修改符合 Console 插件的筛选判断。
3. 隐藏加载异常的提示。

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

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

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
2. 检查是否有加载成功。
3. 创建一个没有插件访问权限的角色。
4. 登录之后检查是否有无权限提示。

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


```release-note
优化 Console 端加载插件资源的逻辑。
```
2023-01-16 08:40:14 +00:00
Ryan Wang 9d5529b827
feat: add full-functional post category select component for formkit (#818)
#### What type of PR is this?

/kind feature

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

添加功能更为全面的文章分类选择器,支持以下特性:

1. 按层级展示分类
2. 支持搜索
3. 选中结果支持显示层级

todo list:

- [x] 样式整理
- [x] 支持创建新分类

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

Fixes https://github.com/halo-dev/halo/issues/2670
Fixes https://github.com/halo-dev/halo/issues/2485

#### Screenshots:

<img width="832" alt="image" src="https://user-images.githubusercontent.com/21301288/211768419-087d9727-1468-41a1-868a-62d90eef9cca.png">
<img width="858" alt="image" src="https://user-images.githubusercontent.com/21301288/211768478-dcc70d79-127b-42b0-ae44-e48a6a22273a.png">


#### Special notes for your reviewer:

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

```release-note
重构 Console 端的文章分类选择器。
```
2023-01-16 08:02:13 +00:00
Ryan Wang b132a950a8
feat: make sidebar logo link to home page (#822)
#### What type of PR is this?

/kind feature

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

将侧边栏的 Logo 链接到首页。

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

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

#### Screenshots:

<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/212281869-19729c60-8e5c-4a50-b087-55b360b1aedb.png">

#### Special notes for your reviewer:

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

```release-note
支持点击 Console 侧边栏 Logo 跳转到首页
```
2023-01-16 03:26:13 +00:00
vayci c55f662d05
feat: update comment list sorter (#821)
#### 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/3138

#### Screenshots:

![image](https://user-images.githubusercontent.com/17878156/212250458-edaeb149-8c3f-411d-b72b-5a70677cd300.png)

#### Special notes for your reviewer:

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

```release-note
修改评论列表默认排序规则,排序方式新增“最后回复时间”排序方式
```
2023-01-16 03:10:13 +00:00
Ryan Wang fffbd4aa51
feat: add full-functional post tag select component for formkit (#817)
#### What type of PR is this?

/kind feature

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

添加功能更为全面的文章标签选择器,解决在标签过多场景下的适用性问题,支持以下特性:

1. 支持搜索标签。
2. 支持没有搜索结果的时候创建新标签。
3. 支持单选和多选。

> 当前并未考虑实现一个通用的标签创建组件,仅为文章考虑。

todo list:

- [x] 样式整理
- [x] 重命名组件名

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

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

#### Screenshots:

<img width="796" alt="image" src="https://user-images.githubusercontent.com/21301288/211768172-b8dbf1c2-5f7c-4411-b8cc-f0070320649d.png">
<img width="725" alt="image" src="https://user-images.githubusercontent.com/21301288/211768235-8d587374-abad-40c9-b9e0-ea2b27e58495.png">


#### Special notes for your reviewer:

1. 创建若干文章,并进行标签设置的操作。
2. 测试标签选择,搜索,创建,删除,取消选择等操作。

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


```release-note
重构 Console 端的文章标签选择器。
```
2023-01-16 02:58:13 +00:00
Ryan Wang 6e6b35b252
chore: bump vite version to 4 (#819)
#### What type of PR is this?

/kind improvement

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

升级 Vite 到 Vite 4,请看:

- https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#400-2022-12-09
- https://cn.vitejs.dev/guide/migration.html

无破坏更新。

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

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

#### Special notes for your reviewer:

测试方式:

1. 测试开发环境和生产环境是否加载正常即可。
2. 测试包含 Console 的插件是否正常加载。

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

```release-note
升级 Console 项目的 Vite 版本到 Vite 4
```
2023-01-13 05:30:11 +00:00
Ryan Wang 2ef02f2e80
refactor: refactor the page management and remove the function page (#816)
#### What type of PR is this?

/kind api-change
/kind improvement

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

1. 重构页面管理,移除功能页面的功能,改为由插件自行配置菜单。
2. 改进自定义页面的 UI 权限绑定,不会再出现没有勾选相关角色,但仍然显示左侧**页面**菜单的问题。

原由请看:https://github.com/halo-dev/halo/issues/3124

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

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

#### Screenshots:

<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/211480169-fd0490a6-bd1a-447c-bde4-155a16355734.png">

插件需要自己定义菜单配置,如:

<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/211480228-146e6b53-9da4-4a60-b691-dd183f0a45c7.png">

```diff
export default definePlugin({
-  name: "PluginLinks",
   components: {},
   routes: [
     {
       parentName: "Root",
       route: {
-        path: "/pages/functional/links",
+        path: "/links",
         name: "Links",
         component: LinkList,
         meta: {
           permissions: ["plugin:links:view"],
+          menu: {
+            name: "链接",
+            group: "content",
+            icon: markRaw(RiLinksLine),
+          },
         },
       },
     },
   ],
-  extensionPoints: {
-    "page:functional:create": () => {
-      return [
-        {
-          name: "链接",
-          url: "/links",
-          path: "/pages/functional/links",
-          permissions: ["plugin:links:view"],
-        },
-      ];
-    },
-  },
 });
```

#### Special notes for your reviewer:

测试方式:

1. 测试左侧菜单的页面入口是否正常。
2. 创建一个新的角色,不勾选页面的查看权限,登录后检查是否可以在左侧菜单看到页面选项。
3. 测试插件添加菜单是否正常,可测试插件:[plugin-links-1.0.0-SNAPSHOT-plain.jar.zip](https://github.com/halo-dev/console/files/10379709/plugin-links-1.0.0-SNAPSHOT-plain.jar.zip)


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

```release-note
重构页面管理,移除功能页面的功能。
```
2023-01-10 10:44:40 +00:00
longjuan 8068a57afa
fix: timeout error caused by upload processing for more than 30 seconds (#813)
<!--  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?

<!--
添加其中一个类别:
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
-->
/kind improvement
#### What this PR does / why we need it:
Remove the timeout error prompt caused by the upload server processing for more than 30 seconds
#### 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/3041
#### 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)
-->
![image](https://user-images.githubusercontent.com/28662535/210917239-b4b050f8-766f-4289-9ba2-ccb99bb6ac55.png)
![image](https://user-images.githubusercontent.com/28662535/210917273-c6291485-f420-4f02-a7c8-2b4b286110d4.png)


#### Special notes for your reviewer:
测试:
上传大文件让后端处理过程超过30秒,观察是否报错
或使用[修改后的插件](https://github.com/longjuan/halo-plugin-s3os/actions/runs/3852075387)上传到对象存储,观察61秒后是否上传成功
#### 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
去除上传文件处理时间超过30秒后的报错
```
2023-01-06 03:10:37 +00:00
vayci 564327d3c7
fix: remove login form icon, fix icon lose warning (#812)
#### What type of PR is this?

/kind optimization

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

remove login form icon, fix icon lose dev tool console warning

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

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

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

```release-note
NONE
```
2022-12-30 09:22:33 +00:00
Ryan Wang ee660d77e2
chore: release 2.1.0 (#811)
#### What type of PR is this?

/kind improvement

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

发布 Console 2.1.0

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

Ref https://github.com/halo-dev/halo/issues/3077

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

```release-note
None
```
2022-12-30 02:32:33 +00:00
Ryan Wang ad5348d63d
feat: add target attribute setting for menu item (#805)
#### What type of PR is this?

/kind feature

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

支持为菜单项设置链接打开方式。 适配:https://github.com/halo-dev/halo/pull/3072

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

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

#### Screenshots:

<img width="714" alt="image" src="https://user-images.githubusercontent.com/21301288/209922511-120bc82c-4d13-4dd8-9829-0ba173cdc377.png">


#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3072 的分支。
2. Console 需要 `pnpm install`
3. 创建若干菜单项,并设置打开方式。
4. 检查是否设置正确。

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

```release-note
菜单项支持设置打开方式
```
2022-12-29 13:50:33 +00:00