Commit Graph

279 Commits (52d064381f0664b2da655470558ddca3b0ce16a5)

Author SHA1 Message Date
Ryan Wang 8afd50f84f
feat: make backup list item operations extendable (#4508)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

备份列表的操作列表支持被插件扩展。

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

```release-note
Console 端的备份列表的操作按钮列表支持扩展。
```
2023-08-29 03:36:16 +00:00
Ryan Wang 68658f9b3a
feat: add supports for system restore by remote url (#4507)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

系统恢复支持通过远程文件链接恢复

<img width="806" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/f9f2694d-b051-49c0-9f9f-695e04d4f13e">
<img width="1019" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/dc428f36-5620-4042-b7fc-cbcdb06db679">


#### Special notes for your reviewer:

测试远程恢复的功能是否正常即可。

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

```release-note
系统恢复功能支持通过远程文件链接恢复。
```
2023-08-29 03:12:16 +00:00
Ryan Wang e7f53fad05
feat: display total items text for plugins list (#4500)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.9.x

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

在 https://github.com/halo-dev/halo/pull/4473 中移除了插件管理的分页功能,但可能会造成列表底部看起来不协调,所以恢复总条数的文字显示。

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

Fixes #4498 

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

```release-note
None 
```
2023-08-28 03:50:13 +00:00
Ryan Wang 24d1d9460c
chore: update repository config for console packages (#4495)
#### What type of PR is this?

/area console
/kind cleanup

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

更新 Console 中 package.json 文件的 repository 设置。

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

```release-note
None
```
2023-08-28 03:30:14 +00:00
Takagi a28c9a9781
pref: optimize the caching functionality of content editing (#4458)
#### What type of PR is this?

/kind improvement

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

本 PR 优化了文章、内容编辑时的本地缓存功能,之前内容对于本地缓存的依赖性非常强,因此导致了部分问题,如 #3820 ,本 PR 计划之后本地缓存将仅用于特殊情况下的内容恢复,因此尝试做了如下修改:
1. 当前正在编辑的文章,会在正常模式(切换路由、刷新页面、失去当前窗口焦点、停止编写一定时间均属于正常模式)下进行自动保存后删除本地缓存。
2. 若本地具有缓存,则会在进入编辑页面时,比对一次 content 的 version,若缓存 version 小于线上 version,则抛弃缓存,若一致,则使用缓存。

但经过测试,本 PR 无法解决如下问题:
1. 同时编辑一篇文章时,内容会被覆盖的问题。
2. 对比版本后会抛弃缓存,而实际上应当将本地缓存加入历史版本中。

#### How to test it?

1. 新建一篇文章,编写任意内容,返回文章页查看是否已经具有新的文章,且内容已被保存。
2. 修改一篇文章的内容,然后返回文章页,查看是否不是从缓存中加载。
3. 断网模式下修改一篇文章的内容,然后返回文章页,联网后,再次打开此文章,查看是否显示从缓存中加载。
4. 断网模式下修改一篇文章的内容,然后返回文章页。在另一个浏览器或页面修改此文章并保存后,回到断网页面联网后,查看是否更新为最新内容。

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

Fixes #3820 
Fixes #4223 

#### Does this PR introduce a user-facing change?
```release-note
减少内容编辑对本地缓存依赖,支持内容自动保存至服务端。
```
2023-08-25 16:18:16 +00:00
Ryan Wang 8ad59631b1
chore: bump @halo-dev/richtext-editor version to alpha.30 (#4490)
#### What type of PR is this?

/area console
/kind cleanup
/milestone 2.9.x

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

升级默认编辑器的版本,包含以下修改:

1. 图片支持修改 alt 属性。 https://github.com/halo-sigs/richtext-editor/pull/32
2. 拖拽修改图片大小的时候保持等比例。 https://github.com/halo-sigs/richtext-editor/pull/33
3. 优化在移动端下,编辑器右侧边栏的样式。 https://github.com/halo-sigs/richtext-editor/pull/35
4. 编辑器标题、段落及代码块增加 Tab 快捷键缩进。 https://github.com/halo-sigs/richtext-editor/pull/34

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

```release-note
升级默认编辑器的版本,包含以下更改:

1. 图片支持修改 alt 属性。 by @GodlessLiu in <https://github.com/halo-sigs/richtext-editor/pull/32>
2. 拖拽修改图片大小的时候保持等比例。 by @GodlessLiu in <https://github.com/halo-sigs/richtext-editor/pull/33>
3. 优化在移动端下,编辑器右侧边栏的样式。 by @ruibaby in <https://github.com/halo-sigs/richtext-editor/pull/35>
4. 编辑器标题、段落及代码块增加 Tab 快捷键缩进。 by @LIlGG in <https://github.com/halo-sigs/richtext-editor/pull/34>
```
2023-08-25 16:14:13 +00:00
Ryan Wang f01e04f5a0
feat: add batch operation feature for plugins (#4482)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

支持对插件进行批量操作。

<img width="577" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/ec3ed727-e151-44d0-8c18-b6ec8a309ea9">

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

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

#### Special notes for your reviewer:

测试批量对插件进行启用、停用、卸载。

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

```release-note
Console 端的插件管理支持批量操作。
```
2023-08-25 16:00:13 +00:00
Ryan Wang 138ffde7e2
refactor: remove the pagination feature of plugin management (#4473)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.9.x

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

移除插件管理列表的分页功能,默认列表出所有安装的插件。

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

Fixes #4469 

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

```release-note
移除 Console 端插件管理列表的分页功能,默认列表出所有安装的插件。
```
2023-08-25 15:42:14 +00:00
Ryan Wang 03bf2aea7c
fix: setup state is not set due to an exception when initializing the data (#4484)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.9.x

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

修复因为初始化数据异常导致没有记录初始化状态的问题,这个问题可能会导致失败之后无法再让系统正常访问。

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

```release-note
None
```
2023-08-25 15:34:14 +00:00
Ryan Wang 63bbd4fa81
Refactor plugin installation modal to support extend (#4461)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

重构插件安装的界面,以支持扩展。

文档:https://github.com/halo-dev/halo/pull/4461/files?short_path=fe4adc6#diff-fe4adc66005d24150478d0919c5f330ee695c2b5657ee7baed56929830c7eb90

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

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

#### Special notes for your reviewer:

需要测试插件的本地上传和远程下载的安装的更新。

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

```release-note
重构 Console 端插件安装界面,支持通过插件扩展选项卡。
```
2023-08-25 15:28:12 +00:00
John Niang 7603b21dd2
Support restoring with downloadable URL or backup name (#4474)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.9.x

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

Currently, we only support restoring by uploading backup file. Downloading and uploading larger backup files can be cumbersome for users.

This PR supports restoring with downloadable URL or backup name as well.

#### Special notes for your reviewer:

```bash
# Replace ${BACKUP_NAME} by yourself.
curl -u admin:admin 'http://localhost:8090/apis/api.console.migration.halo.run/v1alpha1/restorations' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary3Al7pC6AbBNfB1js' \
  --data-raw $'------WebKitFormBoundary3Al7pC6AbBNfB1js\r\nContent-Disposition: form-data; name="backupName"\r\n\r\n${BACKUP_NAME}\r\n------WebKitFormBoundary3Al7pC6AbBNfB1js--\r\n'
```

```bash
# Replace ${DOWNLOAD_LINK} by yourself.
curl -u admin:admin 'http://localhost:8090/apis/api.console.migration.halo.run/v1alpha1/restorations' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytv6cqgmANkCpSuZm' \
  --data-raw $'------WebKitFormBoundarytv6cqgmANkCpSuZm\r\nContent-Disposition: form-data; name="downloadUrl"\r\n\r\n${DOWNLOAD_LINK}\r\n------WebKitFormBoundarytv6cqgmANkCpSuZm--\r\n'
```

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

```release-note
新增提供下载链接或者备份名进行系统恢复的功能。
```
2023-08-25 15:22:11 +00:00
Ryan Wang e5df695f9d
chore: bump uppy related packages version (#4487)
#### What type of PR is this?

/area console
/kind cleanup
/milestone 2.9.x

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

升级 Console 端上传组件(Uppy)相关依赖的版本。

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

```release-note
升级 Console 端上传组件(Uppy)相关依赖的版本。
```
2023-08-25 15:10:12 +00:00
Hilary Liu dcddf5a355
fix: avatar component cannot watch data updates (#4459)
#### What type of PR is this?
/kind bug
/area console
/kind improvement

#### What this PR does / why we need it:
当用户对头像进行删除或修改时,文章页面和用户页面的头像会出现显示错误。
#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4408
Fixes https://github.com/halo-dev/halo/issues/4352

#### Special notes for your reviewer:

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

```release-note
修复 Console 端头像组件的图片更新问题
```
2023-08-25 15:06:13 +00:00
Hilary Liu 81cafb14bb
fix: style issue of post widget when post title is too long (#4416)
<!--  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 console
<!--
添加其中一个类别:
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 https://github.com/halo-dev/halo/issues/4304

#### Special notes for your reviewer:
目前我的解决方案是将Entity加上一个flex-wrap,这样可以保证日期显示完整,但是这可能导致上下文章的布局结构不统一。不知是否可以采纳。
![image](https://github.com/halo-dev/halo/assets/110895612/45218eaf-7d7c-46ba-80ad-2d646e5b16dd)

#### 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-08-25 14:36:12 +00:00
longjuan 5e21909e36
chore: register AttachmentFileTypeIcon component globally (#4489)
<!--  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
/area console
<!--
添加其中一个类别:
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:
将 AttachmentFileTypeIcon 在 Console 全局进行注册,以在插件中复用此组件。
#### 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/4413

#### Special notes for your reviewer:
我把组件放到 `@/components` 里了,不合适我改回去
#### 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-08-25 13:24:11 +00:00
Ryan Wang 7a057679da
refactor: remove the confirmation box of the enable/disable plugin (#4472)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.9.x

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

移除启动/停止插件的确认弹框。

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

Fixes #4471 

#### Special notes for your reviewer:

测试启动和停止插件是否正常工作即可。

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

```release-note
移除 Console 端启动/停止插件的确认弹框。
```
2023-08-25 09:26:13 +00:00
Ryan Wang 70eb039468
feat: add extension point for extend data list operation items (#4452)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

添加扩展数据列表中操作按钮列表的基础能力,并为文章和插件管理列表的操作按钮列表添加扩展点以测试此扩展能力。

todo:

- [x] 场景测试
- [x] 文档 

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

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

#### Special notes for your reviewer:

可以使用以下插件进行测试:

- 源码:[plugin-export-md.zip](https://github.com/halo-dev/halo/files/12436956/plugin-export-md.zip)
- 可安装的 JAR 包:[plugin-export-md-1.0.0-SNAPSHOT.jar.zip](https://github.com/halo-dev/halo/files/12436950/plugin-export-md-1.0.0-SNAPSHOT.jar.zip)

安装之后可以在文章列表的操作按钮列表中新增一个 `导出为 Markdown 文档` 的按钮,点击之后会导出一个 Markdown 文档。

<img width="374" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/eb0b7c61-f5c8-4af3-bf13-579681d36097">


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

```release-note
Console 端的文章和插件列表的操作按钮列表支持扩展。
```
2023-08-25 09:02:12 +00:00
Ryan Wang 141e22e2c6
feat: add mouse scrolling handler for tabs component (#4453)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

Console 端的 Tabs 组件支持通过鼠标滚动选项卡。

![2023-08-21 16 15 46](https://github.com/halo-dev/halo/assets/21301288/8fa56d4d-04d3-47a5-8515-2caf54ac9258)

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

Fixes #4353 

#### Special notes for your reviewer:

None

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

```release-note
Console 端的 Tabs 组件支持通过鼠标滚动选项卡。
```
2023-08-25 08:38:15 +00:00
guqing 5c115563e0
feat: add API to obtain the bundled js file for all enabled plugins (#3444)
#### What type of PR is this?
/kind feature
/milestone 2.3.x
/area core
#### What this PR does / why we need it:
提供 `/apis/api.console.halo.run/v1alpha1/plugins/bundle.js` 来获取已启用插件的捆绑后的 main.js 和 style.css 文件

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

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

```release-note
优化已启用插件 jsbundle 文件的加载方式
```
2023-08-25 07:28:11 +00:00
Takagi ec0187d8aa
fix: the search for comments by username yields empty results (#4481)
#### What type of PR is this?

/kind bug
/area console
/milestone 2.9.x

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

Console 评论列表中,使用用户名查询时携带 kind

#### How to test it?

在 Console 端评论列表,选中右上角评论者,进行选择。

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

Fixes #4465 

#### Does this PR introduce a user-facing change?
```release-note
解决评论列表根据评论者条件筛选时为空的问题
```
2023-08-25 06:32:11 +00:00
Hilary Liu 42ef7265c7
feat: store attachment view type to localStorage (#4477)
#### What type of PR is this?
/kind improvement
/kind console

#### What this PR does / why we need it:
修改附件显示模式后,保存状态
#### Which issue(s) this PR fixes:

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

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


```release-note
Console 端附件管理的显示模式支持缓存到浏览器。
```
2023-08-24 14:38:14 +00:00
Ryan Wang 6326ec1d86
refactor: improve plugin upgrade related code to resolve performance issue (#4410)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.9.x

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

优化插件升级相关代码,解决插件管理列表的潜在性能问题。

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

Fixes #4409 

#### Special notes for your reviewer:

需要测试插件安装和升级功能

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

```release-note
优化 Console 端插件管理列表的性能
```
2023-08-22 08:12:12 +00:00
XinKeng 8ea397da5c
perf: increasing the editor performance (#4445)
A function to debounce editor updates was added to the DefaultEditor.vue component. This change was necessary to prevent excessive event executions. Now, 'update:raw', 'update:content', and 'update' events will be emitted 250ms after the last update, reducing the number of redundant operations and increasing the editor's performance.

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

<!--
添加其中一个类别:
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 #4389

#### 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
增强默认编辑器在文章内容过大时的性能。
```
2023-08-20 17:14:12 +00:00
Ryan Wang 43e1e446b6
feat: add reveal button for password input (#4434)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

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

为 FormKit 的 password 类型输入框添加统一的显示/隐藏明文按钮。

<img width="541" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/2947cef2-258c-434d-9268-c8b5ad26a9f7">


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

Fixes #4382 

#### Special notes for your reviewer:

测试密码输入框的显示隐藏明文按钮是否可以正常使用即可。

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

```release-note
为 FormKit 的 password 类型输入框添加统一的显示/隐藏明文按钮。
```
2023-08-16 06:38:11 +00:00
Ryan Wang 8678d614e2
chore: bump formkit version to 0.18.0 (#4428)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.9.x

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

升级 FormKit 依赖至 [0.18.0](https://formkit.com/changelog#_0180-beta-18)

修复[升级到 0.17.5](https://github.com/halo-dev/halo/pull/4411) 之后输入框失去焦点之后无法提交的问题。

see https://github.com/halo-dev/halo/issues/4424#issuecomment-1677331547

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

Fixes #4424 

#### Special notes for your reviewer:

需要测试各个输入框是否正常工作。

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

```release-note
升级 FormKit 的依赖至 0.18.0
```
2023-08-16 03:30:12 +00:00
Ryan Wang 58679b2811
chore: bump vue related packages version (#4427)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.9.x

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

升级 Vue 至 3.3 以及相关的依赖。

see https://blog.vuejs.org/posts/vue-3-3

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

Fixes #4425 

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

```release-note
升级 Vue 至 3.3 以及相关的依赖。
```
2023-08-16 02:16:25 +00:00
Takagi bce65c4947
fix: handle external exceptions when uploading files (#4431)
#### What type of PR is this?

/kind bug
/area console
/milestone 2.9.x

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

原先使用 uppy 上传文件时抛出异常时,处理了 Halo 系统内部异常,但并未处理外部抛出的异常,例如反向代理等,因而会导致上传文件时卡在 0% 或者 100%。
更改之后当上传抛出异常时,首先会尝试将异常信息转换为 JSON,如果转换失败,则代表为外部异常,此时会抛出异常信息,异常信息格式为 `status: statusText`。

<img width="1045" alt="image" src="https://github.com/halo-dev/halo/assets/31335418/228a73aa-b22e-40f9-b69d-3180e2f78032">


#### How to test it?

在 Halo 上传接口前增加一层反向代理,并设置最大允许文件值,之后上传超过其值的文件进行尝试,若能够成功抛出异常即可。

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

Fixes #4359 

#### Does this PR introduce a user-facing change?
```release-note
修复上传文件时由于外部异常而导致进度条不变的问题
```
2023-08-15 10:02:12 +00:00
Takagi 6282efbe70
fix: redirection fails after login (#4423)
#### What type of PR is this?

/kind bug

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

对 console 跳转链接进行编码,用于解决跳转链接中如果携带非标准字符而导致的报错

#### How to test it?

本地开发环境:重定向地址无误且进行了 uri 编码即可。

生产环境:
在 console 后端未登录时,前往应用市场输入网站地址进行安装,之后进行登录,查看是否能够正确跳转。

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

Fixes #4351

#### Does this PR introduce a user-facing change?
```release-note
对 console 重定向链接进行编码
```
2023-08-15 09:00:13 +00:00
Takagi 5779f01161
pref: allow annotations value to be empty (#4419)
#### What type of PR is this?

/kind improvement

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

由于后端 annotation 的值可以为空,而前端则规定 annotation 值为必填项,因此去除前端必填属性。

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

Fixes #4279 

#### Does this PR introduce a user-facing change?
```release-note
将元数据值更改为非必填
```
2023-08-14 14:08:13 +00:00
Ryan Wang 905e867eb3
chore: bump formkit version to 0.17.5 (#4411)
#### What type of PR is this?

/area console
/kind cleanup
/milestone 2.9.x

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

升级 FormKit 的依赖至 0.17.5

see https://formkit.com/changelog

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

```release-note
升级 FormKit 的依赖至 0.17.5
```
2023-08-13 14:40:12 +00:00
guqing 5690de3f24
refactor: improve the system initialization process (#4306)
* refactor: improve the system initialization process

* Sync api-client

Signed-off-by: Ryan Wang <i@ryanc.cc>

* feat: add initialized state to global info

* Refine setup page ui

Signed-off-by: Ryan Wang <i@ryanc.cc>

* refactor: improve the system initialization process

* Refine setup page ui

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Refine setup page ui

Signed-off-by: Ryan Wang <i@ryanc.cc>

* fix: update with initialize state

* Refactor setup

Signed-off-by: Ryan Wang <i@ryanc.cc>

* refactor: initialization state

* Refactor router guards

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Refine i18n

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Refactor init data

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Refactor init data

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update console/src/views/system/Setup.vue

Co-authored-by: Takagi <mail@e.lixingyong.com>

* refactor: initialization interface

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Takagi <mail@e.lixingyong.com>
2023-08-11 09:10:35 +08:00
John Niang 1172f4a98c
Support restarting Halo (#4361)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.9.x

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

Support restarting Halo and enable restart endpoint by default.

Restart endpoint detail:

request uri: `/actuator/restart`
request method: `POST`

Please note that memory usage may slightly increase after restarting Halo.

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

```release-note
支持在线重启 Halo。
```
2023-08-09 06:04:11 +00:00
Takagi 3ec409100b
fix: resolve the issue of ineffective duplicate key validation in AnnotationsForm (#4369)
#### What type of PR is this?

/kind bug
/area console

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

在 AnnotationsForm 新增 customAnnotationsDuplicateKey 校验规则,校验自定义元数据中是否具有重复的 key。

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

Fixes #4367 

#### Special notes for your reviewer:

在任意一个使用 AnnotationsForm 的位置,例如`文章设置 - 元数据` 中,新增一个已经存在的 key,查看是否有重复 key 的校验。

#### Does this PR introduce a user-facing change?
```release-note
修复 AnnotationsForm 重复的 key 校验无效的问题。
```
2023-08-08 07:04:12 +00:00
Takagi 9774530abd
fix: add random uuid to resolve the issue of id conflicts (#4371)
#### What type of PR is this?

/kind bug
/area console

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

为 AnnotationsForm 的 formkit 表单 id 增加 uuid 前缀,防止由于一个页面具有多个 AnnotationsForm 时编号互相冲突。

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

Fixes #4368 

#### Special notes for your reviewer:

检查使用 AnnotationsForm 的界面,例如文章、页面设置的元数据处没有出现问题即可。

#### Does this PR introduce a user-facing change?
```release-note
None
```
2023-08-04 03:11:48 +00:00
Takagi 9b8b4294e5
pref: scroll to the error location when form submission validation fails (#4358)
#### What type of PR is this?

/kind improvement
/area console

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

为 `Formkit` 添加自动滚动至错误的插件,当表单校验不通过时,如果错误处被隐藏,则会滚动至错误处。

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

Fixes #4317 

#### Special notes for your reviewer:

找到表单中的必选项或其他校验项,尝试填写一个错误的选项。之后滚动表单直到隐藏当前项,此时点击提交,查看是否能够自动滚动至对应的错误项。

#### Does this PR introduce a user-facing change?
```release-note
当表单填写错误时,将会自动滚动至错误项。
```
2023-08-03 07:51:27 +00:00
dependabot[bot] 355fb860e5
chore(deps-dev): bump @antfu/utils from 0.7.2 to 0.7.5 in /console (#4363)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 15:37:16 +08:00
Takagi 2ee51b0c56
fix: resolve the issue of users being able to delete themselves. (#4355)
#### What type of PR is this?

/kind bug
/area console

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

在用户列表中,禁止用户选中自己,以解决用户能够进行视觉上自我删除的 bug。

<img width="1636" alt="image" src="https://github.com/halo-dev/halo/assets/31335418/d95f7cf5-cfea-49fa-8f68-d13c46bc88c1">

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

Fixes #4350 

#### Special notes for your reviewer:

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

```release-note
在用户列表中禁用选中当前用户
```
2023-08-03 07:23:32 +00:00
dependabot[bot] 6b748efeaf
chore(deps-dev): bump vite from 4.0.4 to 4.0.5 in /console (#4362)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.0.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.0.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 21:50:26 +08:00
Ryan Wang 734adeb373
chore: use rollup-plugin-gzip instead of vite-compression-plugin (#4354)
#### What type of PR is this?

/area console
/kind cleanup
/milestone 2.9.x

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

使用 [rollup-plugin-gzip](https://www.npmjs.com/package/rollup-plugin-gzip) 代替 [vite-compression-plugin](https://www.npmjs.com/package/vite-compression-plugin) 在 Vite 编译后对资源进行 gzip。

原因是 vite-compression-plugin 已经在 npmjs.com 下架。

#### Special notes for your reviewer:

无特别需要注意,CI 能通过就行。

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

```release-note
None
```
2023-08-02 13:12:25 +00:00
John Niang 7efd29e722
Prepare for developing Halo 2.9.0 (#4344)
#### What type of PR is this?

/kind cleanup
/area core

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

Bump up Halo to `2.9.0-SNAPSHOT` for developing Halo 2.9.0.

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

```release-note
None
```
2023-08-01 07:33:45 +00:00
Ryan Wang ebe77ad697
chore: bump console version to prepare release 2.8 (#4341)
#### What type of PR is this?

/kind cleanup

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

修改 Console 以及其下 packages 的版本号,发布 Halo 2.8

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

```release-note
None
```
2023-08-01 02:48:16 +00:00
Ryan Wang 370b44f9b5
fix: not reset permission after cloning a role (#4333)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复创建角色时,如果基于某个角色创建,实际权限可能不会更新的问题。

#### Special notes for your reviewer:

需要测试:

1. 基于超级管理员创建新角色。
2. 取消勾选一些角色模板。
3. 测试此角色是否存在取消了勾选的角色模板。

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

```release-note
修复创建角色时,如果基于某个角色创建,实际权限可能不会更新的问题。
```
2023-08-01 02:46:20 +00:00
知雨 81e985f2af
chore: update zh-tw translation for refresh search engine operation (#4335)
#### What type of PR is this?

/kind improvement
/area console
/milestone 2.8.x

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

优化刷新搜索引擎索引的文案。

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


```release-note
优化刷新搜索引擎索引的文案。
```
2023-08-01 02:32:17 +00:00
知雨 181420be7a
chore: update zh-cn translation for refresh search engine operation (#4334)
#### What type of PR is this?

/kind improvement
/area console
/milestone 2.8.x

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

优化刷新搜索引擎索引的文案。

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


```release-note
优化刷新搜索引擎索引的文案。
```
2023-08-01 02:30:19 +00:00
Erzbir 897b603ea9
fix: page does not refresh or get wrong page when turn page (#4331)
#### 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 #4330

#### Special notes for your reviewer:
1. 准备附件测试翻页
2. 在第一页的最后一个附件预览中点击 "next", 观察是否正常
3. 在第二页的第一个附件预览中点击 "pre", 观察是否正常

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

```release-note
预览附件点击 "下一个" 或者 "上一个" 翻页后, 预览页面不正常刷新
```
2023-07-31 03:42:40 +00:00
Erzbir 8e0538e0d0
fix: click "next" on the last attachment will get null (#4328)
#### What type of PR is this?

/kind bug
/area console
/milestone 2.8.x

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

修复在最后一个附件点击 "下一个" 时, 附件库内容全部消失或得到一个 "空" 附件, 且不能 "往前"

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

Fixes #4326

#### Special notes for your reviewer:
1. 上传附件
2. 一直点击 "下一个" 直到最后一张
3. 在最后一张再点击下一个, 观察页面是否出现异常, 正常情况下会停在最后一个附件上且页面不会有刷新

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

```release-note
修复 Console 端在最后一个附件点击下一项按钮时得到空结果的问题。
```
2023-07-29 09:12:18 +00:00
John Niang 5a18adcdd0
Prepare for releasing 2.8.0-rc.2 (#4323)
#### What type of PR is this?

/kind cleanup

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

Bump version of console to 2.8.0-rc.2.

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

```release-note
None
```
2023-07-28 07:17:18 +00:00
Ryan Wang 38664d45ef
refactor: remove the duplicate button to create a backup (#4322)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

移除备份列表空状态的创建备份按钮,防止出现多个创建的按钮。

<img width="1669" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/2f79c05e-090d-4318-bd91-07680bb881be">

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

```release-note
None 
```
2023-07-28 03:33:09 +00:00
Ryan Wang 02c47f552a
refactor: refactor pagination component to support display total items (#4303)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构 Console 的分页组件,以支持显示数据总条数。

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

Fixes #4268 

#### Special notes for your reviewer:

需要测试:

- 测试各个页面的分页功能是否正常

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

```release-note
重构 Console 的分页组件,以支持显示数据总条数。
```
2023-07-28 03:15:08 +00:00
Ryan Wang 4733008e16
fix: content cache was not cleaned up after the new post was saved (#4316)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复新建文章发布或者保存之后,浏览器中的内容缓存没有清空的问题。

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

Fixes #4310 

#### Special notes for your reviewer:

需要测试:

1. 新建一篇文章,测试未保存到服务器时,刷新浏览器,观察内容是否还存在。
2. 保存之后,再次新建文章,观察编辑器是否没有内容。

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

```release-note
修复新建文章发布或者保存之后,浏览器中的内容缓存没有清空的问题。
```
2023-07-28 03:09:09 +00:00
Ryan Wang e0d79cc2b2
fix: user detail page switching does not take effect (#4321)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复用户详情页面切换用户之后,数据不更新的问题。操作路径:

1. 进入任意一个用户的资料页面。
2. 点击左下角当前登录用户的个人资料。

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

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

#### Special notes for your reviewer:

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

```release-note
修复用户详情页面切换用户之后,数据不更新的问题。
```
2023-07-28 02:57:10 +00:00
Ryan Wang eced9365a2
fix: unable to expand the replies list of the comment (#4305)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复评论有新回复时,无法展开回复列表的问题。

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

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

#### Special notes for your reviewer:

需要测试:

1. 选中任意一个评论,尝试进行回复。
2. 点击回复按钮打开回复列表,观察是否能够正常打开。

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

```release-note
修复 Console 的评论有新回复时,无法展开回复列表的问题。
```
2023-07-28 02:35:09 +00:00
Ryan Wang 57ec43bedc
feat: add download tips in plugin and theme installation modal (#4314)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

在安装主题和插件的界面中添加下载源的提示。

<img width="631" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/f28d0f24-8c65-4589-a5c0-32fea3a2bd2b">

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

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

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

```release-note
在安装主题和插件的界面中添加下载源的提示。
```
2023-07-28 02:21:09 +00:00
Ryan Wang f3d7e856ac
feat: add a link back to the site on the login page (#4262)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.0

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

在登录页面添加返回到前台的链接。


<img width="506" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/31c6311d-7153-4028-b2dd-78d89e018bf3">



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

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

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

```release-note
在 Console 的登录页面添加返回到前台的链接。
```
2023-07-27 04:34:12 +00:00
Takagi 4f1537b68f
pref: internationalize the avatar processing toolbar (#4313)
#### What type of PR is this?

/kind improvement

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

对头像处理组件的 toolbar 进行国际化处理。

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

Fixes #4296 

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?
```release-note
None
```
2023-07-27 04:12:13 +00:00
Ryan Wang cf9a9e8a6d
feat: refine restore completed tips i18n (#4301)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

完善备份恢复界面的 i18n。

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

```release-note
None
```
2023-07-26 08:00:19 +00:00
Ryan Wang a617ea164c
feat: require confirmation before restoring backup (#4300)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

在恢复备份的界面,改为需要先点击开始恢复按钮再显示上传区域。

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

Fixes #4295 

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

```release-note
None 
```
2023-07-26 06:44:23 +00:00
Ryan Wang 25725e520e
feat: add showCancel prop for dialog component (#4302)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

为 Dialog 组件添加 showCancel 属性用于控制是否显示取消按钮,某些场景下 Dialog 只是用于提示切必须点击确定。

此外,还对以下位置做了对应修改:

1. 进入文章编辑时检查编辑器是否存在的弹框,只允许点击确定并返回。
2. 备份恢复完成之后点击确定关闭 Halo。

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

```release-note
Console 端的 Dialog 组件添加 showCancel 属性用于控制是否显示取消按钮。
```
2023-07-26 06:42:19 +00:00
Ryan Wang cfe77c5ded
chore: release 2.8.0-rc.1 (#4290)
#### What this PR does / why we need it:

修改版本号,发布 2.8.0-rc.1

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

```release-note
None
```
2023-07-24 12:48:15 +00:00
Ryan Wang f56de041b4
chore: bump default editor version to 27 (#4288)
#### What type of PR is this?

/area console
/area editor
/milestone 2.8.x
/kind feature

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

升级默认编辑器以支持:

1. 重构 Block 操作区域逻辑,防止误操作。 Fixes https://github.com/halo-dev/halo/issues/4164
2. 支持设置文字背景颜色和字体颜色。
3. iframe block 支持主动刷新页面。 https://github.com/halo-dev/halo/issues/4227
4. 在顶部工具栏的区域添加工具箱。
5. 支持设置字体大小。

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

```release-note
升级默认编辑器版本,支持设置字体颜色、大小等功能,优化使用体验。
```
2023-07-24 12:46:14 +00:00
John Niang bd912c36b9
Support backup and restore (#4206)
#### What type of PR is this?

/kind feature
/area core

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

See 9921deb076/docs/backup-and-restore.md for more.

<img width="1906" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/41531186-d305-44fd-8bdc-30df9b71af43">
<img width="1909" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/3d7af1b9-37ad-4a40-9b81-f15ed0f1f6e8">


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

Fixes https://github.com/halo-dev/halo/issues/4059
Fixes https://github.com/halo-dev/halo/issues/3274

#### Special notes for your reviewer:

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

```release-note
支持备份和恢复功能。
```
2023-07-24 08:26:16 +00:00
Takagi 84093d8db0
feat: add support for user avatar upload (#4253)
#### What type of PR is this?

/kind improvement
/area console
/area core

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

此 PR 对用户头像上传的方式进行了重构,移除了原有的头像链接及上传至附件库的方案。允许具有用户管理权限的用户对其他用户的头像进行修改和移除。

Core: 
新增了 `/apis/api.console.halo.run/v1alpha1/users/-/avatar` 的 `POST` 以及 `DELETE` 接口,用来上传用户的头像及删除当前用户的头像。

Console:
新增对用户头像进行裁剪的功能,并调用上传接口保存用户头像。

需等待 #4247 合并

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

Fixes #2688 

See #4251 
See #4247 

#### Special notes for your reviewer:

1. 测试上传、删除头像接口是否能够正常执行。
2. 查看当前用户的头像是否能够设置成功。
3. 查看附件库中,当前用户的头像文件是否为 0 或 1 个。

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

```release-note
支持裁剪、上传和删除用户头像。
```
2023-07-24 08:08:04 +00:00
John Niang fdfaa53614
Support sort parameter when listing extensions (#4274)
#### What type of PR is this?

/kind feature
/area core

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

Currently, we cannot pass a sort parameter into extensions' list API, so the result of the API is unsortable.

This PR add the support for that API. e.g.:

```bash
curl -X 'GET' \
  'http://localhost:8090/api/v1alpha1/annotationsettings?sort=metadata.name,desc' \
  -H 'accept: */*'
```

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

```release-note
Extension 查询接口支持排序参数。
```
2023-07-24 07:02:23 +00:00
Ryan Wang 617d05f3bc
refactor: remove username input validation rule in user editing form (#4276)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

移除用户编辑表单中用户名的校验规则,在这个表单中,用户名本身就是不能修改的,所以不需要验证。移除之后还能够解决旧版本 Halo 升级之后无法修改资料的问题。(旧版本没有用户名校验)

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

Fixes #4269 

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

```release-note
移除 Console 端用户编辑表单中用户名的校验规则,防止旧版本 Halo 升级之后无法修改资料。
```
2023-07-21 09:04:14 +00:00
Ryan Wang 834e37cf13
feat: record the attachment query conditions in the route query parameters (#4210)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

在附件数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新浏览器窗口或者从编辑页面返回时保留之前的查询状态。

<img width="1714" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/cd3ab1da-ac5c-48c7-a8f2-83f2f86a47bc">

#### Special notes for your reviewer:

需要测试:

1. 附件管理列表的所有筛选项是否可以正常工作。
2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。

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

```release-note
Console 端的附件管理列表支持在地址栏记录筛选条件。
```
2023-07-21 03:50:14 +00:00
dependabot[bot] dc18d287e7
chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /console (#4270)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-21 11:22:28 +08:00
Ryan Wang 51848d8563
fix: search input component cannot be rendered normally under a non-secure domain name (#4260)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复在非安全域名下,SearchInput 组件无法正常渲染的问题,因为使用了 crypto 接口来随机生成表单的 id。但 crypto 在非安全域名下无法被调用,参考:https://developer.mozilla.org/en-US/docs/Web/API/Crypto

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

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

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

```release-note
None
```
2023-07-21 02:34:17 +00:00
Ryan Wang 7ee6e050a2
feat: record the comment query conditions in the route query parameters (#4209)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

在评论数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新浏览器窗口或者从其他页面返回的时候不丢失筛选条件。

<img width="1544" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/39573c8d-f664-40d1-8248-90443179ac73">

#### Special notes for your reviewer:

需要测试:

1. 评论管理列表的所有筛选项是否可以正常工作。
2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。

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

```release-note
Console 端的评论管理列表支持在地址栏记录筛选条件。
```
2023-07-21 02:28:13 +00:00
Ryan Wang 6b70296956
refactor: code structure of the post data list (#4219)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构 Console 端文章管理列表的代码结构,封装列表项为单个组件。

#### Special notes for your reviewer:

需要测试文章管理的功能是否正常。

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

```release-note
None
```
2023-07-20 08:10:18 +00:00
Ryan Wang ea792f511b
refactor: code structure of the single page data list (#4220)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构 Console 端页面管理列表的代码结构,封装列表项为单个组件。

#### Special notes for your reviewer:

需要测试页面管理的功能是否正常。

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

```release-note
None
```
2023-07-20 07:40:18 +00:00
Ryan Wang ad1ec3641c
chore: bump @halo-dev/richtext-editor to fix image size was abnormally modified (#4264)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

升级编辑器以修复图片被自动修改尺寸的问题,see https://github.com/halo-sigs/richtext-editor/pull/22

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

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

#### Special notes for your reviewer:

测试方法可以参考:https://github.com/halo-sigs/richtext-editor/pull/22

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

```release-note
修复编辑文章时,原来的图片尺寸被自动修改的问题。
```
2023-07-20 07:30:18 +00:00
Takagi 5a7e794fea
feat: allow attachment library to filter certain groups and their attachments (#4255)
#### What type of PR is this?

/kind feature
/area core

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

为附件库增加过滤条件,过滤 labels 中包含 `halo.run/hidden` 的分组及其附件。

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

Fixes #4251 

#### Special notes for your reviewer:

保证默认情况下附件能够正常访问即可。
或者为分组增加 `halo.run/hidden` label,之后查看接口中是否不包含具有目标分组及其附件。

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

```release-note
None
```
2023-07-20 07:28:17 +00:00
Ryan Wang d21472dc0f
fix: post status filter item cannot be displayed when the page is refreshed (#4263)
#### What type of PR is this?

/kind bug
/area console
/milestone 2.8.x

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

修复文章状态筛选在刷新页面之后无法回显的问题。

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

see https://github.com/halo-dev/halo/pull/4219#issuecomment-1641310000

#### Special notes for your reviewer:

需要测试:

1. 在文章管理页面选择某个状态筛序项,观察数据是否正常。
2. 刷新页面,观察筛选项是否回显。

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

```release-note
None
```
2023-07-20 07:24:18 +00:00
Ryan Wang ec2ab632fc
feat: refine validation for password field (#4257)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

在 Console 端关于用户密码输入的部分添加基本的验证,目前的规则是:

1. 必填,且不能全为空格符
2. 长度为 5-100
3. 字符串前后不能有空格

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

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

#### Special notes for your reviewer:

按照以上规则测试即可。

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

```release-note
Console 端关于用户密码输入的部分添加基本的验证
```
2023-07-19 11:48:12 +00:00
Ryan Wang 2ade57184c
feat: record the single page query conditions in the route query parameters (#4208)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

在页面数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新浏览器窗口或者从编辑页面返回时保留之前的查询状态。

<img width="1597" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/5e14019b-9751-4a3f-b5c4-ec28b8ba4380">

#### Special notes for your reviewer:

需要测试:

1. 页面管理列表的所有筛选项是否可以正常工作。
2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。
3. 尝试设置部分筛选,然后选择任意一个页面进行编辑,观察发布之后是否正常返回到管理列表,并正确设置了查询参数。

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

```release-note
Console 端的页面管理列表支持在地址栏记录筛选条件。
```
2023-07-19 11:46:17 +00:00
Takagi 01b81f1afc
feat: add attachment policy and group selection component to formkit (#4258)
#### What type of PR is this?

/kind feature
/area console

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

为 formkit 添加一个 `attachmentPolicySelect` 类型的下拉选择框组件,用来供用户选择附件策略。
同时也添加了一个 `attachmentGroupSelect` 类型的下拉选择框组件,用来供用户选择附件分组。

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

Fixes #4247 

#### Special notes for your reviewer:

使用 formkit 组件时将 type 修改为 `attachmentPolicySelect` 或 `attachmentGroupSelect`,查看是否能够展示一个可以选择附件策略或附件分组的组件,

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

```release-note
None
```
2023-07-19 11:06:13 +00:00
Ryan Wang 022526386a
perf: improve polling interval for api requests (#4246)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

优化 Console 端对异步数据轮询的间隔时间

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

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

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

```release-note
优化 Console 端对异步数据轮询的间隔时间
```
2023-07-19 03:44:12 +00:00
Ryan Wang 53b8ccb7c9
fix: delay issue in the theme settings tab switch (#4240)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复主题设置选项卡切换的延迟问题。

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

Fixes #4239 

#### Special notes for your reviewer:

需要测试:

1. 进入主题设置,尝试对设置选项卡进行切换,观察选项卡和实际的设置表单是否一致。

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

```release-note
None
```
2023-07-19 03:26:13 +00:00
Ryan Wang e6f31759a0
feat: allow switching editors while editing a post (#4180)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

支持在编辑文章时切换编辑器,不再限制仅新建时允许切换。但需要注意的是,目前只支持同类型的编辑器切换(rawType)。

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

Fixes #4176 

#### Special notes for your reviewer:

测试方式:

1. 安装多个编辑器插件,可以在 https://github.com/halo-sigs/awesome-halo 中查找。
2. 测试在新建文章时是否能够正常切换编辑器。
3. 测试在修改文章时能够正常切换同类型的编辑器。

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

```release-note
Console 端编辑文章时允许同类型的编辑器切换。
```
2023-07-18 08:16:02 +00:00
Ryan Wang ad9b0dfb21
fix: system settings and plugin settings panels cannot be displayed (#4222)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.8.x

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

修复系统设置面板和插件设置面板无法正常显示的问题,此问题由 https://github.com/halo-dev/halo/pull/4102 中升级了 `@vueuse/router` 导致。

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

Fixes #4221 

#### Special notes for your reviewer:

需要测试:

1. 测试系统设置能否正常工作。
2. 测试插件的设置能否正常工作。

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

```release-note
None
```
2023-07-16 15:34:17 +00:00
Ryan Wang b1a6fe3446
feat: register the AnnotationsForm component globally (#4212)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

全局注册 AnnotationsForm 组件,以暴露给插件使用,让插件可以实现为模型设置 annotations 数据的功能。

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

Fixes #4183 

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

```release-note
Console 端全局注册 AnnotationsForm 组件,以暴露给插件使用
```
2023-07-14 04:18:10 +00:00
Ryan Wang efcf526f1b
refactor: logic of attachment data filtering (#4194)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构附件数据管理的筛选条件逻辑以及 UI。

<img width="1645" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/6b13045e-ab6b-4306-a1bb-f19d97115191">


Ref https://github.com/halo-dev/halo/pull/4182
Ref https://github.com/halo-dev/halo/issues/4181

#### Special notes for your reviewer:

需要测试:

1. 测试附件的筛选条件包括关键词筛选功能是否正常。

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

```release-note
重构 Console 端附件数据列表的筛选项 UI 和逻辑。
```
2023-07-13 03:31:17 +00:00
Ryan Wang 6bba5073fa
refactor: simplify the logic of the system settings tab (#4196)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

简化系统设置页面,选项卡的状态管理逻辑,放弃动态路由的模式,改为使用路由查询参数代替。

原由:https://github.com/halo-dev/halo/pull/4041#issuecomment-1622921084

#### Special notes for your reviewer:

需要测试:

1. 测试系统设置页面能否正常工作即可。

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

```release-note
重构 Console 端系统设置页面的路由结构
```
2023-07-12 06:19:15 +00:00
Ryan Wang bb0a5f114a
feat: record the post query conditions in the route query parameters (#4102)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.8.x

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

在文章数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新页面或者从文章编辑页面返回时保留之前的查询状态。

<img width="1758" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/270948d6-d585-4b36-ad3a-93064cf47548">

TODO:

- [x] 记录筛选条件,因为路由参数只能使用基本类型,但是原来的筛选条件的变量都是完整对象。

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

Fixes #4098 

#### Special notes for your reviewer:

需要测试:

1. 文章管理列表的所有筛选项是否可以正常工作。
2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。

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

```release-note
Console 端的文章管理列表支持在地址栏记录筛选条件。
```
2023-07-12 06:17:20 +00:00
Ryan Wang 197096305b
refactor: logic of comment data filtering (#4195)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构评论数据管理的筛选条件逻辑以及 UI。

<img width="1650" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/d89769bb-b8af-427e-a1ec-6ac8674131d3">

Ref https://github.com/halo-dev/halo/pull/4182
Ref https://github.com/halo-dev/halo/issues/4181

#### Special notes for your reviewer:

需要测试:

1. 测试评论的筛选条件包括关键词筛选功能是否正常。

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

```release-note
重构 Console 端评论数据列表的筛选项 UI 和逻辑。
```
2023-07-12 01:53:12 +00:00
Ryan Wang 119f352145
refactor: logic of post and singlepage data filtering (#4193)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构文章和页面数据管理的筛选条件逻辑以及 UI。

<img width="1646" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/154c5588-91c0-448d-aa39-d75e90bce6ca">


Ref https://github.com/halo-dev/halo/pull/4182
Ref https://github.com/halo-dev/halo/issues/4181

#### Special notes for your reviewer:

需要测试:

1. 测试文章的筛选条件包括关键词筛选功能是否正常。
2. 测试页面的筛选条件包括关键词筛选功能是否正常。

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

```release-note
重构 Console 端文章数据列表的筛选项 UI 和逻辑。
```
2023-07-11 07:15:10 +00:00
Ryan Wang f622b1787c
refactor: data list filter components (#4182)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.8.x

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

重构 Console 端数据列表的筛选项 UI,并提供全局的筛选列表组件和搜索输入框组件。

> 在此 PR 同时重构了插件列表和用户列表用于验证,其他页面后续提 PR 修改。

<img width="1657" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/ffa42184-46e6-4cb0-b39f-bd7b18869697">

重构之后可以获得:

1. 更好的代码组织。
2. 更好的使用体验。
3. UI 更加容易适配移动端。

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

Fixes #4181 

#### Special notes for your reviewer:

需要测试:

1. 测试插件管理和用户管理的数据列表筛选和关键词搜索功能是否正常。

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

```release-note
重构 Console 端数据列表的筛选项 UI,并提供全局的筛选列表组件和搜索输入框组件。
```
2023-07-07 08:23:06 +00:00
Ryan Wang c0aae3a63c
feat: make plugin tabs extensible (#4041)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.7.x

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

插件自身的详情页面中的 Tabs 选项卡支持拓展,允许开发者自行为插件编写设置界面、一些不常用的操作页面等。

示例:

<img width="1358" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/1e414e4e-688d-47de-907f-5f2a0afa9350">

扩展方式:

参考文档:https://github.com/ruibaby/halo/blob/feat/plugin-tabs-extend/console/docs/extension-points/plugin-self-tabs.md

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

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

#### Special notes for your reviewer:

需要测试:

1. 测试任意插件的详情页面是否能够正常使用。
2. 测试任意插件的设置表单能否正常使用。
3. 可以尝试根据文档为某个插件添加自定义的选项卡,测试是否能够正常工作。

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

```release-note
Console 端插件详情选项卡支持通过插件扩展。
```
2023-07-07 04:38:11 +00:00
Ryan Wang dcafee7e1f
chore: release 2.7.0 (#4158)
#### What this PR does / why we need it:

修改版本号,准备发布 2.7.0。

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

```release-note
None
```
2023-06-30 03:16:12 +00:00
John Niang 4685bf4052
Add role template for managing cache (#4153)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.7.x

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

Add role template for managing cache. Anyone with role `role-template-manage-cache` can see the `Refresh Page Cache` button.

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

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

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

```release-note
None
```
2023-06-29 07:48:12 +00:00
John Niang 0d387eddf3
Enable configuration caching with separate names (#4151)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.7.x

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

Refactor configuration properties to configure caching with separate names, so that we can enable / disable cache with name.

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

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

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

```release-note
None
```
2023-06-29 07:02:11 +00:00
Ryan Wang baba8b9d24
chore: bump @halo-dev/richtext-editor version to alpha 24 (#4146) 2023-06-29 00:10:58 +08:00
Ryan Wang 8db4cec91e
feat: add support for inserting external media resources to the default editor (#4126)
#### What type of PR is this?

/kind feature
/area console
/area editor
/milestone 2.7.x

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

默认编辑器支持直接插入图片、视频、音频,提供除了附件库的媒体插入入口。

<img width="1011" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/4c9be243-882f-4d21-9fa8-ce3033744746">

通过链接插入图片需要 https://github.com/halo-sigs/richtext-editor/pull/17 的支持。

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

Fixes https://github.com/halo-dev/halo/issues/3882
Fixes https://github.com/halo-dev/halo/issues/3994

#### Special notes for your reviewer:

测试编辑器通过链接插入图片、视频、音频的功能是否正常。

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

```release-note
默认编辑器支持不通过附件库直接插入图片、视频、音频。
```
2023-06-28 09:54:11 +00:00
Ryan Wang 02e7068ee0
refactor: simplify request exception handling (#4129)
#### What type of PR is this?

/kind improvement
/area console
/milestone 2.7.x

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

简化请求异常提示的逻辑。

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

```release-note
None
```
2023-06-28 06:44:12 +00:00
John Niang d0526ec592
Add support for caching template rendering result (#4091)
#### What type of PR is this?

/kind feature
/area core

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

This PR adds dependency [spring-boot-starter-cache](https://docs.spring.io/spring-boot/docs/current/reference/html/io.html#io.caching) as cache framework and [caffeine](https://github.com/ben-manes/caffeine/wiki) as cache implementation to cache template rendering result.

By default, we disable the cache feature. If you want to enable it, please try to configure properties like this:

```yaml
halo:
  cache:
    disabled: false
```

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

Fixes #2827 

#### Special notes for your reviewer:

1. Start Halo
2. Browse any page twice
3. See the difference in request times

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

```release-note
支持模板渲染结果缓存
```
2023-06-26 14:38:00 +00:00
guqing 2791d2f0e5
refactor: uinify some properties of plugins and themes (#4061)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.7.x
/kind api-change

#### What this PR does / why we need it:
统一主题和插件描述文件的部分字段
1. 统一网站字段为 homepage,将主题的 website 标记为过时并兼容为 homepage
2. 主题添加 license 字段
3. 插件添加 repo

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

#### Does this PR introduce a user-facing change?
```release-note
统一主题和插件描述文件的部分字段
```
2023-06-26 14:33:58 +00:00
Ryan Wang e13beb4cd1
feat: add redirect support for social auth provider (#4063)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.7.x

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

三方登录时支持传入 `login_redirect_uri` 参数,以让三方登录提供方支持适配登录后重定向到具体页面的功能。

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

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

#### Special notes for your reviewer:

测试方式:

1. 可以使用 https://github.com/halo-sigs/plugin-oauth2/pull/33 进行测试。
2. 手动在登录页面构造如 https://127.0.0.1:8090/console/login?redirect_uri=/ 的地址,观察使用三方登录之后是否会跳转到指定页面。

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

```release-note
Console 端三方登录支持重定向参数。
```
2023-06-26 13:35:58 +00:00
Ryan Wang c39691d6fe
feat: make default editor extensible (#4090)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.7.x

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

默认编辑器支持扩展,包括输入类型、工具栏、Slash Command 等。

Ref https://github.com/halo-sigs/richtext-editor/pull/16

## 定义方式

```ts
import ExtensionFoo from "./tiptap/extension-foo.ts"

export default definePlugin({
  extensionPoints: {
    "default:editor:extension:create": () => {
      return [ExtensionFoo];
    },
  },
});
```

其中,`ExtensionFoo` 是一个 Tiptap Extension,可以参考 [Tiptap 文档](https://tiptap.dev/) 和 [https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md](https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md)。

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

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

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

```release-note
Console 端的默认编辑器支持被扩展
```
2023-06-26 13:33:59 +00:00
Ryan Wang 34d0f9369b
refactor: add legacy option for useClipboard hook to solve compatibility issues (#4114)
#### What type of PR is this?

/kind improvement
/area console
/milestone 2.7.x

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

Console 端部分使用了复制功能的页面,所使用的 useClipboard hook 添加 legacy 参数以解决部分浏览器的兼容问题。

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

Fixes #4113 

#### Special notes for your reviewer:

1. 使用路由地址(192.168.x.x)访问 Halo。
2. 测试附件详情弹框的链接复制和概览页面中的复制功能是否正常。

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

```release-note
优化 Console 端部分页面复制功能的兼容性问题。
```
2023-06-26 13:28:08 +00:00
Ryan Wang 27ef8d3bab
fix: dropdown options cannot be clicked in some mobile devices (#4116)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.7.x

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

修复在部分移动端浏览器(比如 iOS Safari)中,下拉框组件(VDropdown)的选项点击无效的问题,即没有触发 click 事件。此问题的原因可能是因为我们用的 floating-vue 组件提供的 `v-close-popper` 指令的兼容问题,最小复现:https://stackblitz.com/edit/vitejs-vite-ncpzhj?file=src%2FApp.vue

此 PR 改写了关闭下拉框的方式,不再使用 v-close-popper 指令,而且对其他使用此组件的地方没有破坏性更新。

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

Fixes https://github.com/halo-dev/halo/issues/3689
Ref https://github.com/halo-dev/halo/issues/2699

#### Special notes for your reviewer:

如果有条件可以在移动端测试一下,尤其是 iOS Safari,目前在桌面端 Chrome 的设备模拟中测试正常。

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

```release-note
修复 Console 端的下拉框组件选项在移动端无法正常点击的问题。
```
2023-06-26 13:21:57 +00:00