Commit Graph

265 Commits (7e0daaedac5ba11535ec7820659414dc54fd6eb8)

Author SHA1 Message Date
Ryan Wang 7f9de2ffd3
fix: cannot save post when the publishTime is blank (#763)
#### 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/2906

#### Special notes for your reviewer:

测试方式:

1. 进入新建文章页面。
2. 点击右上角发布按钮,填写必要的标题和别名,然后点击保存。
3. 点击右上角设置按钮,切换到高级设置,再次点击保存。
4. 观察是否正常保存。

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

```release-note
修复 Console 端文章设置中的发布时间为空字符串时,无法保存的问题。
```
2022-12-12 06:36:22 +00:00
ZXSheng faba6f40ea
perf: add tooltip for some icon buttons (#745)
#### What type of PR is this?
/kind improvement

#### What this PR does / why we need it:
部分 UI 元素使用了图标代替文字,但某些情况下可能会导致无法直观的判断具体用途,添加 tooltip 以提示使用者。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2656

#### Screenshots:
![image](https://user-images.githubusercontent.com/28836989/205815182-4e599e7b-58b9-4b38-8a8f-11685c4f5f4d.png)
![image](https://user-images.githubusercontent.com/28836989/205815258-90bc111d-552c-456b-a9ce-d2a4e7a4f93d.png)

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

```release-note
Console 端为部分图标按钮添加操作提示,提升可访问性。
```
2022-12-09 07:16:15 +00:00
Ryan Wang c70b069753
feat: refining the logic of user roles (#749)
#### What type of PR is this?

/kind improvement
/milestone 2.0.1

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

完善用户角色的相关逻辑。适配 https://github.com/halo-dev/halo/pull/2865

1. 支持标识是否是系统保留角色。
2. 根据是否是系统保留角色,禁用修改和删除的操作。
3. 支持判断是否是超级管理员,如果是,默认勾选所有权限。
4. 优化 `包含 N 个权限` 文案的逻辑,超级管理员为 `包含所有权限`。
5. 优化 `基于此角色创建` 的逻辑,判断是否为超级管理员,如果是,需要设置所有角色模板到创建表单。

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

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

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/205965292-b8f8e556-e06b-422b-b0be-8d87a68f18be.png">
<img width="1661" alt="image" src="https://user-images.githubusercontent.com/21301288/205965333-1491c023-6726-4cdd-b970-d868a30f3296.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2865 分支。
2. 测试角色相关的所有功能。

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


```release-note
完善 Console 端用户角色的相关逻辑
```
2022-12-07 04:40:53 +00:00
Ryan Wang 581f7156f5
fix: plugin failed to get settings when plugin is stopped (#750)
#### What type of PR is this?

/kind bug
/milestone 2.0.1

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

修复插件停止时,仍然获取设置选项导致提示失败的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 安装一个插件,将其停止之后检查是否有获取 setting 的请求以及页面上是否有提示。

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

```release-note
修复在 Console 端停止插件时,仍然获取设置选项导致显示失败提示的问题。
```
2022-12-07 04:38:53 +00:00
Ryan Wang 5a8b046862
perf: optimize the issue of animation when switching setting tabs (#748)
#### What type of PR is this?

/kind improvement

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

优化主题和插件详情页面切换 tab 时的页面闪动问题。

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

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

#### Special notes for your reviewer:

测试方式:检查在主题和插件详情页面是否还存在 https://github.com/halo-dev/halo/issues/2856 中提到的问题。

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

```release-note
优化 Console 端的主题和插件详情页面切换选项卡时的页面闪动问题。
```
2022-12-07 04:26:54 +00:00
Joy 7bbad8bd73
perf: improve the text of the upgrade theme button (#747)
#### 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/2857

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

```release-note
None
```
2022-12-06 10:52:15 +00:00
Ryan Wang 058c5e312e
fix: the issue that custom link type menu items cannot be saved normally (#743)
#### What type of PR is this?

/kind bug
/milestone 2.0.1

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

修复创建菜单项的时候,自定义链接类型的菜单项无法正常保存名称和链接的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 创建若干自定义类型的菜单项。
2. 检查是否成功保存了名称和连接。

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

```release-note
修复 Console 端无法正常创建自定义链接类型菜单项的问题。
```
2022-12-05 09:42:12 +00:00
Ryan Wang 812b8eda0d
feat: api client requests support configuring the mute parameter to hide exception toast (#744)
#### What type of PR is this?

/kind improvement
/milestone 2.0.1

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

使用 api-client 进行网络请求时,支持添加 `mute` 参数以隐藏异常提示。

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

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

#### Special notes for your reviewer:

None

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

```release-note
None
```
2022-12-05 09:40:12 +00:00
Ryan Wang 8b24cee0f6
refactor: plugin extension points of console plugin (#738)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构 Console 端插件扩展点的定义方式。现在需要如下定义:

```ts
  extensionPoints: {
    "page:functional:create": () => {
      return [
        {
          name: "链接",
          url: "/links",
          path: "/pages/functional/links",
          permissions: ["plugin:links:view"],
        },
      ];
    },
  },
```

#### Special notes for your reviewer:

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

- https://github.com/halo-sigs/plugin-links
- https://github.com/halo-sigs/plugin-unsplash

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


```release-note
None
```
2022-11-30 17:15:50 +00:00
Ryan Wang debaec537e
refactor: plugin author field (#737)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修改插件的 author 字段为对象形式。适配 https://github.com/halo-dev/halo/pull/2806

#### Special notes for your reviewer:

None

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

```release-note
None
```
2022-11-30 15:35:50 +00:00
Ryan Wang c26e438420
refactor: widgets of dashboard page (#736)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化仪表盘小部件的样式和数据获取方式。

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

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

#### Screenshots:

<img width="1664" alt="image" src="https://user-images.githubusercontent.com/21301288/204808668-29d65e42-eabc-4598-9a9e-03597d6a0344.png">

#### Special notes for your reviewer:

None

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

```release-note
None
```
2022-11-30 14:51:49 +00:00
ZXSheng c20767a30a
feat: post editing pages support caching of content to the browser (#731)
#### 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/2773

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

```release-note
Console 端支持实时保存内容到浏览器,防止意外操作丢失内容。
```
2022-11-30 07:21:47 +00:00
Ryan Wang 81c1a188a0
refactor: remove the option to make the post internally accessible to members (#733)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

移除文章设置中内部成员可访问的选项,目前后端没有支持。

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


```release-note
None
```
2022-11-30 04:19:46 +00:00
Ryan Wang 87fc8cacbd
refactor: simplify MenuItem with targetRef instead of multi refs (#730)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构菜单项关联关系的引用方式。适配:https://github.com/halo-dev/halo/pull/2799

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

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

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2799 分支。
2. Console 需要 `pnpm install`
3. 创建若干带有关联关系的菜单项,检查创建和更新是否正常。

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

```release-note
None
```
2022-11-30 03:51:47 +00:00
Ryan Wang ed5b3c1496
refactor: simplify references in Attachment (#729)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构附件、存储策略、附件分组之间的关联方式。适配:https://github.com/halo-dev/halo/pull/2800

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2800 分支。
2. Console 需要 `pnpm install`
3. 测试附件相关功能。

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

```release-note
None
```
2022-11-30 02:23:46 +00:00
Ryan Wang e7ed52b596
fix: the issue that post publishTime cannot be set and displayed back (#718)
#### What type of PR is this?

/kind bug
/milestone 2.0

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

修复文章和自定义页面的发布时间无法设置和回显的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 创建一篇文章和自定义页面。
2. 在高级设置中设置发布时间。
3. 检查发布后列表中显示的时间是否和设置的一致。
4. 再次打开文章设置,检查发布时间输入框的时间是否正确。

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


```release-note
修复 Console 端文章和自定义页面的发布时间无法设置和回显的问题。
```
2022-11-28 15:32:18 +00:00
Ryan Wang 9b71f4969b
perf: allow clicking on the link address of the data list (#712)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

为部分包含了主题端路由的资源添加跳转按钮或者链接。

#### Screenshots:

<img width="618" alt="image" src="https://user-images.githubusercontent.com/21301288/203952290-6d04f192-de83-4d6e-b9cf-b89463034b12.png">


#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
Console 端部分包含了主题端路由的数据列表添加跳转按钮或者链接。
```
2022-11-28 14:34:19 +00:00
Ryan Wang 6901cdb812
feat: support for opening login modal after login session expiration (#715)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

支持在登录会话失效之后打开登录弹窗,而不是直接跳转到登录页面,防止正在编辑的内容丢失。

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

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

#### Screenshots:

<img width="541" alt="image" src="https://user-images.githubusercontent.com/21301288/204085654-5c90627b-fbbd-4b04-ac92-f75bab28a1b0.png">


#### Special notes for your reviewer:

测试方式:

1. 打开 Console 之后登录进入到控制台。
2. 重启 Halo 或者等待会话失效。
3. 随意切换控制台界面,观察是否打开了登录弹窗。
4. 重新登录,检查是否成功。

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

```release-note
Console 端支持在登录会话失效之后打开登录弹窗。
```
2022-11-28 14:30:19 +00:00
Ryan Wang 0fc4815a67
fix: the issue that role edit form cannot be submitted in the permission tab (#717)
#### What type of PR is this?

/kind bug
/milestone 2.0-rc.2

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

修复在角色编辑时,如果在权限勾选界面,无法提交表单的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 编辑任意角色或者新建角色。
2. 在编辑弹框中切换到权限勾选界面。
3. 点击提交按钮,观察是否能够正常提交。

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

```release-note
修复在 Console 端角色编辑时,如果在权限勾选界面,无法提交表单的问题。
```
2022-11-28 14:20:18 +00:00
Ryan Wang b604532a7b
fix: issue of uploading attachments to ungrouped group (#716)
#### What type of PR is this?

/kind bug
/milestone 2.0-rc.2

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

修复选择未分组的分组时,上传附件会将分组设置为 `ungrouped` 的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 新建若干附件分组。
2. 切换到未分组,然后打开上传弹框,上传若干附件。
3. 检查所上传附件是否归为未分组。
4. 切换到其他分组,上传若干附件,检查所上传附件是否归为正确分组。

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

```release-note
修复在 Console 端选择未分组的分组时,上传附件会将分组设置为 `ungrouped` 的问题。
```
2022-11-28 14:00:18 +00:00
Ryan Wang 8fbef715ee
feat: set the approvedTime field during approve (#713)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

评论或者回复审核时设置审核时间。适配:https://github.com/halo-dev/halo/pull/2746

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

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

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/issues/2738 分支。
2. Console 需要 `pnpm install`
3. 在主题端创建若干评论,然后去 Console 端审核通过,检查是否正常设置了审核时间。

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

```release-note
Console 端在评论或者回复审核时设置审核时间。
```
2022-11-28 13:28:18 +00:00
Ryan Wang 189573e70b
feat: post list supports displaying the pinned status (#720)
#### What type of PR is this?

/kind feature
/milestone 2.0.0-rc.2

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

支持在文章管理列表显示文章置顶标识。

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

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

#### Screenshots:

<img width="330" alt="image" src="https://user-images.githubusercontent.com/21301288/204138598-9a9265b2-cc2d-4fe6-9059-a804de72ca44.png">

#### Special notes for your reviewer:

测试方式:

1. 创建若干文章。
2. 将部分文章设置为置顶。
3. 返回到列表检查是否有置顶标识。

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


```release-note
Console 端支持在文章管理列表显示文章置顶标识。
```
2022-11-28 13:10:18 +00:00
Ryan Wang adbd972fec
perf: remove the list of users under role details (#726)
#### What type of PR is this?

/kind improvement
/milestone 2.0.0-rc.2

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

移除角色详情页面的用户列表,当前后端暂不支持通过角色查询其下用户。

#### Special notes for your reviewer:

None

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


```release-note
None
```
2022-11-28 11:28:19 +00:00
Ryan Wang 42bec322d1
fix: the issue that the menu is not updated after the menu item is deleted (#725)
#### What type of PR is this?

/kind bug
/milestone 2.0.0-rc.2

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

修复当菜单项被删除时,没有更新菜单的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 创建一个菜单,添加若干个菜单项。
2. 删除部分菜单项,检查菜单下的菜单项个数是否正确。

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

```release-note
修复 Console 端当菜单项被删除时,没有更新菜单的问题。
```
2022-11-28 11:26:17 +00:00
Ryan Wang 83ad16cd3f
feat: add support for automatic label color calculation for post tags (#721)
#### What type of PR is this?

/kind feature
/milestone 2.0.0-rc.2

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

添加自动计算文章标签文字颜色的支持。在之前的版本中,因为引入 colorjs.io 导致在构建之后无法显示标签,目前 colorjs.io 已经修复此问题,此 PR 回归之前的支持。

- https://github.com/LeaVerou/color.js/releases/tag/v0.4.2
- https://github.com/LeaVerou/color.js/pull/239

#### Special notes for your reviewer:

测试方式:

1. 创建若干文章标签,设置不同的背景色,观察文字颜色是否会自动与背景颜色形成反差。
2. 使用 `pnpm build` 构建生产版本,在 Halo 的配置文件中配置 `halo.console.location` 到 Console 的 `dist` 目录。
3. 检查 Console 文章列表中的标签是否显示正常。

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


```release-note
Console 端添加自动计算文章标签文字颜色的支持。
```
2022-11-28 06:36:16 +00:00
BugKing df180c0d81
perf: unify the copywriting style of confirms (#723)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修改了各个删除操作提示弹框的信息,统一了文本风格。
原本存在 `是否确认删除xxx?` 和 `确定删除xxx吗?` 两种风格,统一为后一种风格。

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

```release-note
优化 Console 端确认弹框的提示文案。
```
2022-11-28 06:20:17 +00:00
Ryan Wang 69d4116b72
chore: bump @halo-dev/api-client for reload theme api (#711)
#### What type of PR is this?

/kind api-change
/milestone 2.0

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

升级 `@halo-dev/api-client` 以适配 https://github.com/halo-dev/halo/pull/2745

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/issues/2735 分支。
2. Console 需要 `pnpm install`
3. 安装一个主题,并尝试修改 `theme.yaml` 和 `settings.yaml`,然后再主题详情页面点击 `刷新设置表单` 的按钮,检查改动是否被更新。

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

```release-note
None
```
2022-11-28 02:50:17 +00:00
Ryan Wang 7f4ee54ffb
perf: back to post list when post is first created (#709)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

首次创建文章或者自定义页面时,跳转回管理列表,与编辑保持一致。

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:创建一篇新的文章或自定义页面,点击发布,观察是否返回到了管理列表。

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

```release-note
None
```
2022-11-24 14:59:06 +00:00
Ryan Wang db187f14eb
fix: splash screen issue caused by refreshing the list at regular intervals (#708)
#### What type of PR is this?

/kind bug
/milestone 2.0

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

修复因为 https://github.com/halo-dev/console/pull/703 中添加了 Loading 动画但是没有考虑到定时刷新列表导致页面闪动的问题。

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:删除任意资源,检查列表定时刷新的时候是否出现 loading 状态。

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

```release-note
None
```
2022-11-24 14:51:07 +00:00
Ryan Wang fb4499a6aa
feat: add query attachments by ungrouped parameter support (#706)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

附件管理支持通过参数筛选出未分组的附件。适配 https://github.com/halo-dev/halo/pull/2752

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2752 分支。
2. Console 需要 `pnpm install`
3. 上传若干未分组附件,然后切换到未分组的标签,检查是否查询正确。
4. 将部分附件移动至某个分组,在切换到未分组的标签,检查附件是否正确。

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


```release-note
附件管理支持未分组的筛选条件。
```
2022-11-24 13:17:05 +00:00
Ryan Wang d0efecc9b3
perf: filter dropdown selector (#704)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化文章管理的分类/标签/作者的筛选下拉框样式,以及支持搜索。

#### Screenshots:

<img width="525" alt="image" src="https://user-images.githubusercontent.com/21301288/203499340-b7c59b2f-9be8-4804-9e21-9c5bfbca99bc.png">


#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:检查文章管理的分类 / 标签 / 作者筛选功能是否正常。

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

```release-note
优化文章管理的分类/标签/作者的筛选下拉框样式,以及支持搜索。
```
2022-11-24 05:51:01 +00:00
Ryan Wang e509ff3306
refactor: add loading states for data list (#703)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化列表的加载,添加加载动画,解决加载完成之后界面闪动的问题。

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
优化列表的加载,添加加载动画,解决加载完成之后界面闪动的问题。
```
2022-11-24 03:46:10 +00:00
Ryan Wang d8805f30a0
refactor: managing logged-in user states with pinia (#699)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

使用 Pinia 管理已授权用户信息,并提供判断是否是 `anonymousUser` 的方式。

适配 https://github.com/halo-dev/halo/pull/2729

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试流程:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2729 的分支。
2. 测试 Console 端的登录、退出等流程。

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

```release-note
None
```
2022-11-23 08:39:29 +00:00
Ryan Wang b79eccb6a2
perf: improve the list filter style and support clear all (#702)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化 Console 数据列表的筛选标签样式,以及支持清空所有筛选条件。

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

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

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/203353043-b5e7631f-cc02-4368-b770-42b53e1dbf78.png">

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 测试文章、自定义页面、附件、插件、评论管理中的筛选功能。

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

```release-note
优化 Console 数据列表的筛选标签样式,以及支持清空所有筛选条件。
```
2022-11-23 04:59:28 +00:00
Ryan Wang 2350f541d7
perf: set maximum width for entity-field to prevent text overflow (#700)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

为 `VEntityField` 组件设置最大宽度,防止内容过多导致 UI 异常。

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

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

#### Screenshots:

<img width="534" alt="image" src="https://user-images.githubusercontent.com/21301288/203077107-55cbb951-5ea4-4699-8368-023c60ae9054.png">

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. Console 需要 `pnpm build:packages`
2. 新增任意资源,设置超长的内容,检查列表的样式是否异常。

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

```release-note
为 `VEntityField` 组件设置最大宽度,防止内容过多导致 UI 异常。
```
2022-11-23 04:57:31 +00:00
Ryan Wang 906fdf7c98
perf: adding the necessary validation to the forms (#701)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

完善 Console 中表单的验证规则。

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
完善 Console 中表单的验证规则。
```
2022-11-23 03:00:19 +00:00
Ryan Wang 062e45477c
feat: post editor page supports the parameter of returnToView (#698)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

文章和独立页面的编辑页面支持 `returnTo` 参数,用于指定发布完成之后的跳转地址。

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 选择任意文章进入编辑页面。
2. 在地址栏添加 `&returnTo=http://localhost:8090`
3. 发布文章,观察是否跳转到了 `http://localhost:8090`

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

```release-note
文章和独立页面的编辑页面支持 `returnTo` 参数。
```
2022-11-21 07:14:28 +00:00
Ryan Wang 8deb8ee3bb
refactor: save and publishing logic for post and single page (#696)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化文章和自定义页面的保存内容和发布逻辑。详情可查阅:https://github.com/halo-dev/halo/pull/2709

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试流程:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2709 分支。
2. 测试文章和自定义页面的新建、更新内容,以及发布。

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

```release-note
优化文章和自定义页面的保存内容和发布逻辑。
```
2022-11-18 13:16:23 +00:00
Ryan Wang eef8dc3d43
feat: add delete attachment group and policy support (#695)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

支持删除附件分组和存储策略。

删除策略的逻辑为:删除前会根据策略查询附件,如果有附件,则无法删除,否则可以删除。

删除附件的逻辑为:

1. 选择`删除并将附件移动至未分组`时,会在前端批量调用更新附件的接口,将所有附件的 `groupRef` 置空。
2. 选择`删除并同时删除附件`时,会在前端批量调用删除附件接口。

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 需要执行 `pnpm build:packages`
2. 创建若干存储策略,并在部分存储策略中上传附件,再对存储策略做删除处理,需要满足以下情况:
    1. 已包含附件的策略会提示不允许删除。
    2. 未包含附件的策略可以删除
3. 创建若干分组,并在部分分组中上传附件,再对分组做删除处理,需要满足以下情况:
    1. 选择`删除并将附件移动至未分组`时,检查分组是否被删除,且里面的附件是否已经被移动到未分组。
    2. 选择`删除并同时删除附件`时,检查分组是否被删除,且里面的附件是否被删除。


#### 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
支持删除附件分组和存储策略。
```
2022-11-18 07:22:22 +00:00
Ryan Wang 616bdc8307
refactor: use generateName instead of uuid to generate metadata.name (#688)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

使用 metadata.generateName 代替 uuid 为 metadata.name 生成值。

Ref https://github.com/halo-dev/halo/pull/2563

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 需要 `pnpm install`
2. 测试登录以及所有需要创建更新资源的业务模块。

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

```release-note
None
```
2022-11-18 06:00:23 +00:00
Ryan Wang 1b8805a340
feat: attachment management support sorting (#694)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

附件管理支持排序筛选,适配:https://github.com/halo-dev/halo/pull/2705

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

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

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2705 分支。
2. Console 需要 `pnpm install`
3. 上传若干附件,检查排序筛选之后的结果是否符合预期。

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

```release-note
附件管理支持排序筛选
```
2022-11-17 02:50:22 +00:00
Ryan Wang d8a8d96708
chore: bump dependencies (#689)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

更新所有依赖的修订版本。

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
更新所有依赖的修订版本。
```
2022-11-17 02:38:22 +00:00
Ryan Wang 8386e14301
feat: add formkit custom input of repeater (#692)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

为 FormKit 添加 Repeater 输入类型,用于让用户动态操作一个对象数组。

使用方式可以查阅:https://github.com/ruibaby/halo-console/tree/feat/formkit-repeater/docs/custom-formkit-input#repeater

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

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

#### Screenshots:

<img width="635" alt="image" src="https://user-images.githubusercontent.com/21301288/201640327-5eb0489a-2193-445d-9dfe-7405ae75a297.png">

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 按照 https://github.com/ruibaby/halo-console/tree/feat/formkit-repeater/docs/custom-formkit-input#repeater 文档,在主题或者插件中使用 FormKit Schema 的形式定义设置表单,然后对表单进行保存等设置,检查是否符合预期。
2. 或者使用 https://github.com/halo-sigs/theme-earth/tree/refactor/setting-spec 主题进行测试,这个分支已经对社交媒体和侧边栏进行了适配。可以在主题设置中测试社交媒体和侧边栏配置,检查在主题端的效果。

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

```release-note
为 FormKit 添加 Repeater 输入类型。
```
2022-11-15 07:48:17 +00:00
Ryan Wang 9ac9e1312d
refactor: post publishing (#690)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构文章发布/取消发布/放入回收站的逻辑。适配 https://github.com/halo-dev/halo/pull/2675

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2675 的分支。
2. Console 需要 `pnpm install`。
3. 测试文章发布/取消发布/放入回收站。

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

```release-note
None
```
2022-11-11 16:10:12 +00:00
Ryan Wang fb446d382f
refactor: post and singlePage publishing (#685)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构文章和自定义页面的发布流程。

Ref https://github.com/halo-dev/halo/pull/2659

1. 修改文章、自定义页面标识发布状态的字段名。
2. 修改初始化页面中创建文章和自定义页面的逻辑,取消使用发布接口,改为直接将 `spec.publish` 设置为 `true`
3. 列表支持检测发布状态。

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2659 分支。
2. Console 需要 `pnpm install && pnpm build:packages`
3. 测试文章和自定义页面的发布、保存等流程。需要完整测试整个流程。

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

```release-note
None
```
2022-11-10 16:24:10 +00:00
Ryan Wang f3e44717ee
refactor: post editor (#670)
#### What type of PR is this?

/kind improvement

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

升级 `@halo-dev/richtext-editor`。重构编辑器的结构,目前可以在外部添加菜单项和指令,意味着可以被扩展。

添加 tiptap 拓展的方式:

```
pnpm install @tiptap/extension-character-count
```

然后在创建 Editor 实例的时候需要将拓展添加到 extensions 数组,如:

```ts
const editor = useEditor({
  content: props.modelValue,
  extensions: [
    ...
    ExtensionCharacterCount,
  ],
});
```

最终如果要通过我们的插件机制来拓展编辑器,那么就需要对 extensions 提供可拓展点。

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
None
```
2022-11-10 06:50:09 +00:00
Ryan Wang e93a6fbb4f
feat: add setup primary menu support (#684)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

支持设置主菜单。 适配 https://github.com/halo-dev/halo/pull/2667

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

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

#### Screenshots:

<img width="503" alt="image" src="https://user-images.githubusercontent.com/21301288/200283150-1292821e-ad4b-4909-865b-fcdba94ae4c2.png">

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. Halo 需要使用 https://github.com/halo-dev/halo/pull/2667 分支。
2. 在 Console 的菜单管理新建若干个菜单。
3. 选择一个菜单点击更多按钮,再点击设置为主菜单按钮,检查是否生效。

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

```release-note
菜单管理支持设置主菜单。 
```
2022-11-10 02:34:09 +00:00
Ryan Wang fdf964b18d
perf: improve theme preview modal (#683)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

重构主题预览弹框,支持选择主题以及针对主题进行设置。

todolist:

- [x] 支持保存之后自动刷新预览区域。
- [x] 优化 Tabs 组件,支持横向滚动以解决设置项过多时,选项卡的样式问题。

#### Screenshots:

https://user-images.githubusercontent.com/21301288/200233823-fe317efe-536a-47a9-9495-efdde39be7ca.mp4


#### Special notes for your reviewer:

测试方式:

1. 需要先执行 `pnpm build:packages`
2. 进入主题管理,点击右上角的预览即可打开主题预览窗口

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

```release-note
重构主题预览弹框,支持选择主题以及针对主题进行设置。
```
2022-11-07 07:12:15 +00:00
Ryan Wang d3d28dd3da
perf: optimize the creation of attachment storage policies (#681)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化首次上传附件时,创建存储策略的流程,现在可以直接打开新建策略的表单。

#### Screenshots:

before:

<img width="898" alt="image" src="https://user-images.githubusercontent.com/21301288/199915792-92547e21-ffbb-4c9f-9614-b1f89f7d6f75.png">

after:
<img width="1087" alt="image" src="https://user-images.githubusercontent.com/21301288/199915494-00447427-060a-4744-83b0-d1067e745517.png">


#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 测试在上传弹窗中新建存储策略。

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


```release-note
优化首次上传附件时,创建存储策略的流程。
```
2022-11-04 08:30:10 +00:00
Ryan Wang b0359c4e17
fix: some vue warn in browser dev console (#679)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修复一些因使用不当导致的 Vue warn。

#### Screenshots:

<img width="832" alt="image" src="https://user-images.githubusercontent.com/21301288/199663758-e29f48c4-0c33-4c78-913f-2364ce4b5fbe.png">

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

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

```release-note
None
```
2022-11-03 07:26:18 +00:00