Commit Graph

155 Commits (main)

Author SHA1 Message Date
Ryan Wang 604f27227c
chore: release 2.3.0 (#896)
#### What type of PR is this?

/kind improvement
/milestone 2.3.0

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

发布 2.3.0。

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


```release-note
None
```
2023-02-28 15:28:18 +00:00
Ryan Wang 1dd0d89738
feat: add supports for initialize preset plugins (#894)
#### What type of PR is this?

/kind feature

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

支持在初始化页面安装预设插件。适配:https://github.com/halo-dev/halo/pull/3394

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

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

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3394
2. Console 需要 `pnpm build:packages`
3. 根据 https://github.com/halo-dev/halo/pull/3394 中的提示,将需要预设的插件放置到 `src/main/resources/presets/plugins`
4. 使用全新的环境进行初始化,完成之后进入插件管理检查是否正常安装了预设插件

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

```release-note
Console 端支持在初始化页面安装预设插件。
```
2023-02-28 14:26:18 +00:00
Ryan Wang 3fa95fcbee
chore: release 2.3.0-rc.1 (#888)
#### What type of PR is this?

/kind improvement
/milestone 2.3.x

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

发布 2.3.0-rc.1

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


```release-note
None
```
2023-02-24 10:12:13 +00:00
Ryan Wang 08c58ae179
refactor: support configuring plugin when the plugin is stopped (#875)
#### What type of PR is this?

/kind improvement

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

1. 插件停止时支持配置插件设置项。
2. 修改插件异常信息的获取方式。

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

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

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

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3355 分支。
2. Console 需要 `pnpm build:packages`
3. 根据 https://github.com/halo-dev/halo/pull/3355 中的描述进行测试。

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

```release-note
None
```
2023-02-24 09:52:25 +00:00
Ryan Wang 0eff78787e
refactor: change the creation time field for comments and replies (#874)
#### What type of PR is this?

/kind improvement

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

修改评论和回复的创建时间字段。适配:https://github.com/halo-dev/halo/pull/3341

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

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

#### Special notes for your reviewer:

None

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

```release-note
None
```
2023-02-24 09:50:28 +00:00
Ryan Wang 6244e8b5c0
refactor: request api of user data (#882)
#### What type of PR is this?

/kind improvement

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

重构获取用户信息的请求方式,无需再请求所有角色即可获取当前用户的角色信息,适配:https://github.com/halo-dev/halo/pull/3372

相关 PR:https://github.com/halo-dev/console/pull/847

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

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

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/3372 分支。
2. Console 需要 `pnpm install && pnpm build:packages`
3. 测试用户列表、登录、检查角色信息是否显示正确。

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

```release-note
优化 Console 端用户角色标识的显示名称。
```
2023-02-24 06:06:14 +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 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
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
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 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
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
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
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 f8fe630d4c
chore: release 2.1.0-rc.1 (#802)
#### What type of PR is this?

/kind improvement

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

发布 Console 2.1.0-rc.1

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

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

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


```release-note
None
```
2022-12-26 15:50:31 +00:00
Ryan Wang 9c29538c7a
perf: improve the layout of the post list (#789)
#### 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/2963

#### Screenshots:

<img width="717" alt="image" src="https://user-images.githubusercontent.com/21301288/208836747-c6f97d7f-487a-4984-aa54-ee0d3c5b535a.png">

#### Special notes for your reviewer:

测试方式:

1. 添加若干个文字数量较多的分类。
2. 观察文章列表的样式是否有问题。

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

```release-note
优化 Console 端文章管理列表的布局,修复当分类设置过多时的样式问题。
```
2022-12-22 08:42:30 +00:00
Ryan Wang a396aad87f
feat: add editor extension point (#781)
#### What type of PR is this?

/kind feature

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

添加编辑器的扩展点,用于扩展集成其他编辑器。

定义一个扩展点的方式:

```ts
export default definePlugin({
  extensionPoints: {
    "editor:create": () => {
      return [
        {
          name: "stackedit",
          displayName: "StackEdit",
          component: markRaw(StackEdit),
          rawType: "markdown",
        },
      ];
    },
  },
});
```

其中 `component` 字段即编辑器组件对象,需要包含 `raw`、`content` 的 prop。

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

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

#### Screenshots:

<img width="1664" alt="image" src="https://user-images.githubusercontent.com/21301288/208406097-60258cba-cff6-436f-bd50-6d8c27ea9a53.png">
<img width="1662" alt="image" src="https://user-images.githubusercontent.com/21301288/208406174-d4649365-3448-4581-a452-f9781502eac6.png">
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/208407570-db10e956-cd6a-4e0d-801e-b794ad0261bc.png">
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/208407607-fd595957-5278-40c2-a3b5-fb73c1de429c.png">

#### Special notes for your reviewer:

目前可用于测试的插件:

1. [plugin-stackedit-1.0.0-SNAPSHOT.jar.zip](https://github.com/halo-dev/console/files/10258488/plugin-stackedit-1.0.0-SNAPSHOT.jar.zip)
2. [plugin-bytemd-1.0.0-SNAPSHOT.jar.zip](https://github.com/halo-dev/console/files/10258490/plugin-bytemd-1.0.0-SNAPSHOT.jar.zip)

测试方式:

1. Console 需要 `pnpm build:packages`。
2. 在 Console 的插件管理上传以上插件。
3. 新建若干文章,使用不同的编辑器。
4. 检查是否能够正常发布和编辑。
5. 检查编辑的时候,是否正确使用了之前的编辑器。
6. 检查主题端是否渲染正常。

一些实现细节:

1. 为了支持更新文章时能够选择发布时的编辑器,会在 post 的 `metadata.annotations` 添加一条 `content.halo.run/preferred-editor` 用于标记使用的什么编辑器。如果编辑器不存在,会使用 content 的 `rawType` 来匹配。
2. 目前没有全局默认编辑器设置,只能在新建文章的时候选择。

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

```release-note
Console 端支持扩展集成其他编辑器
```
2022-12-22 04:14:29 +00:00
Ryan Wang 03d2b5ae43
perf: optimize the operation button style of the entity component (#780)
#### What type of PR is this?

/kind improvement

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

优化 Entity 组件(数据列表)的操作按钮样式。

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

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

#### Screenshots:

before:

![image](https://user-images.githubusercontent.com/21301288/208065926-9e0fb332-4075-43cf-b75f-4d040c80ccfa.png)


after:

<img width="1658" alt="image" src="https://user-images.githubusercontent.com/21301288/208066185-a48d5f84-e451-4fc7-9eea-b152ddb8db86.png">



#### Special notes for your reviewer:

None

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


```release-note
优化 Console 端数据列表的操作按钮样式
```
2022-12-19 03:10:12 +00:00
Ryan Wang 7e0daaedac
refactor: remove form-related components (#762)
#### What type of PR is this?

/kind improvement
/milestone 2.1.x

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

移除与表单相关的组件,比如 `VInput`、`VSelect` 等,以后均使用 FormKit 提供的表单元素

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

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

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

```release-note
None
```
2022-12-12 09:12:42 +00:00
Ryan Wang 40765be2e2
chore: release 2.0.0 (#741)
#### What type of PR is this?

/kind improvement

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

修改版本号以发布 Console 2.0.0 正式版。

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-12-01 01:05:51 +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 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
Ryan Wang c1846dcd03
chore: release 2.0.0-rc.2 (#728)
#### What type of PR is this?

/kind improvement

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

发布 Console 2.0.0-rc.2

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

```release-note
None
```
2022-11-28 15:14: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 31b5aedd9d
chore: release 2.0.0-rc.1 (#710)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修改版本号以发布 Console 2.0.0-rc.1

#### 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 15:17:06 +00:00
Ryan Wang becafc2cbd
chore: bump dependencies (#707)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

升级所有依赖的 patch 版本。

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

```release-note
None
```
2022-11-24 13:29:06 +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 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 9175cd63e5
chore: release 2.0.0-beta.2 (#697)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

发布 Console 2.0.0-beta.2

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-11-18 13:36: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 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 e72a175f49
chore: release 2.0.0-beta.1 (#691)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

发布 Console 2.0.0-beta.1

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-11-11 16:14:13 +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 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 bb9124231e
chore: release 2.0.0-alpha.4 (#682)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

发布 Halo 2.0 第四个 alpha 版本的 Console 部分。

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-11-04 13:58:09 +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 673947b2d0
feat: add preset language support for codemirror components (#675)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

为 Codemirror 组件添加更多预设语言支持,以及支持从外部传入语言包。

目前预设支持:

1. yaml
2. html
3. javascript
4. css
5. json

使用方式:

1. 使用预设

```vue
<script lang="ts" setup>
import { VCodemirror } from "@halo-dev/components"
</script>

<template>
    <VCodemirror language="html" />
</template>
```

2. 外部引入

```bash
pnpm install @codemirror/lang-java
```

```vue
<script lang="ts" setup>
import { VCodemirror } from "@halo-dev/components"
import { java } from "@codemirror/lang-java"
</script>

<template>
    <VCodemirror :language="java()" />
</template>
```

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-11-01 06:18:16 +00:00
Ryan Wang aff2447201
chore: release 2.0.0-alpha.3 (#669)
#### What type of PR is this?

/milestone 2.0

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

发布 2.0.0-alpha.3

从此版本开始,`@halo-dev/console-shared` 包的版本与 Console 始终保持一致。

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-10-26 07:48:10 +00:00
Ryan Wang fa54dcb29a
chore: bump dependencies (#667)
#### 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-10-26 07:32:13 +00:00
Ryan Wang 85c3096c29
feat: add a refresh button to the data list (#656)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

为部分功能数据列表添加刷新按钮。

#### Screenshots:

<img width="1664" alt="image" src="https://user-images.githubusercontent.com/21301288/197397277-353befe4-8c43-4326-9ad5-64d2888dc4a3.png">

#### Special notes for your reviewer:

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

测试方式:

1. 需要 `pnpm build:packages`
2. 测试点击刷新按钮是否可以正常请求接口。

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

```release-note
为部分功能数据列表添加刷新按钮。
```
2022-10-24 03:18:16 +00:00
Ryan Wang 544b853201
chore: bump packages version (#654)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

发布 `@halo-dev/components` `@halo-dev/console-shared` 版本。

#### Special notes for your reviewer:

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

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


```release-note
None
```
2022-10-24 02:26:09 +00:00
Ryan Wang 54755c5842
refactor: router and menu generation (#651)
#### What type of PR is this?

/kind api-change
/kind improvement
/milestone 2.0

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

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

重构路由和侧边菜单生成的逻辑,**注意,此 PR 对插件的 Console 入口文件中的路由和菜单定义包含破坏性更新。**

1. 移除 `definePlugin` 方法的 `menus` 字段,改为在 route 的 meta 中定义。
2. 将 `RoutesMenu` 组件从 `@halo-dev/components` 包中移出。
3. 将 `BasicLayout` 组件从 `@halo-dev/console-shared` 包中移出。

定义路由的方式:

```ts
import { definePlugin } from "@halo-dev/console-shared";
import BasicLayout from "@/layouts/BasicLayout.vue";
import AttachmentList from "./AttachmentList.vue";
import AttachmentSelectorModal from "./components/AttachmentSelectorModal.vue";
import { IconFolder } from "@halo-dev/components";
import { markRaw } from "vue";

export default definePlugin({
  name: "attachmentModule",
  components: [AttachmentSelectorModal],
  routes: [
    {
      path: "/attachments",
      component: BasicLayout,
      children: [
        {
          path: "",
          name: "Attachments",
          component: AttachmentList,
          meta: {
            title: "附件",
            permissions: ["system:attachments:view"],
            menu: {
              name: "附件",
              group: "内容",
              icon: markRaw(IconFolder),
              priority: 4,
              mobile: true,
            },
          },
        },
      ],
    },
  ],
});
```

menu 字段类型:

```ts
interface RouteMeta {
  title?: string;
  searchable?: boolean;
  permissions?: string[];
  menu?: {
    name: string;
    group?: string;
    icon?: Component;
    priority: number;
    mobile?: true;
  };
}
```

插件适配需要做的改动:

1. 移除 `definePlugin` 中的 menus 字段。
2. 在需要添加到菜单的 route 中提供 `meta.menu` 对象,可参考上方的 menu 字段类型。

详细文档可查阅:https://github.com/ruibaby/halo-console/tree/refactor/route-map-setting/docs/routes-generation

todolist:

- [x] 完善预设的菜单分组定义。
- [x] 绑定权限,根据权限决定是否需要将路由添加到菜单。
- [x] 优化菜单排序的定义方式。

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

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

#### Special notes for your reviewer:

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

测试方式:

1. 需要 `pnpm build:packages`
2. 测试后台的菜单及路由是否有异常。
3. 新建角色测试路由和菜单对权限的绑定。
4. 按照 https://github.com/ruibaby/halo-console/tree/refactor/route-map-setting/docs/routes-generation 文档,创建插件,测试插件添加路由和菜单是否正常。

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

```release-note
重构路由和侧边菜单生成的逻辑。
```
2022-10-19 08:54:13 +00:00
Ryan Wang 81791cfeac
feat: add operation exception toasts for loading plugin resources and login (#645)
#### 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/2534

#### Screenshots:

<img width="650" alt="image" src="https://user-images.githubusercontent.com/21301288/196105634-ece58153-d9e0-450d-8068-8cda1bed8bcc.png">

<img width="634" alt="image" src="https://user-images.githubusercontent.com/21301288/196105704-e3a59808-8a33-456d-b668-13e891512353.png">

#### Special notes for your reviewer:

目前还没有处理全局的接口请求异常,需要后端修改异常返回结构。

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

#### 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-10-18 03:30:10 +00:00
Ryan Wang 512ee82216
refactor: api of dialog component (#646)
#### What type of PR is this?

/kind api-change
/kind improvement
/milestone 2.0

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

重构 Dialog 组件使用 API 的调用方式,改为与 Toast 组件一致。https://github.com/halo-dev/console/pull/644

同样的,使用此方式调用 Dialog 组件不限制在 Vue 组件。

#### Special notes for your reviewer:

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

需要测试后台各个操作的会话框是否正常。

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

```release-note
重构 Dialog 组件使用 API 的调用方式。
```
2022-10-18 01:58:09 +00:00
Ryan Wang 6d8a2ddd75
perf: refine the fallback of the avatar component (#649)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

优化 Avatar 组件在图片加载失败的状态,以及添加加载状态的动画。目前的策略为,如果图片加载异常,那么会取 `alt` 属性生成占位样式。如果没有设置 `alt`,会显示失败的图标。

#### Screenshots:

<img width="421" alt="image" src="https://user-images.githubusercontent.com/21301288/196194978-229cf58d-19e1-4492-b77a-8b1a6b41e3a0.png">

#### Special notes for your reviewer:

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

测试方式:

1. 需要 `pnpm build:packages`
2. 测试修改个人资料的头像,观测不同效果。
3. 访问 https://halo-admin-ui-git-fork-ruibaby-perf-avatar-fallback-halo-dev.vercel.app/story/src-components-avatar-avatar-story-vue?variantId=_default 测试不同参数的效果。

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

```release-note
优化 Avatar 组件在图片加载失败的状态
```
2022-10-17 16:45:38 +00:00
Ryan Wang 252e3f1392
feat: add toast component (#644)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

添加 Toast 组件。

特性:

1. 支持相同消息合并。
2. 支持鼠标悬停。

使用方式:

```vue
import { Toast } from '@halo-dev/components'

Toast.success("Hello", { //props })
Toast.info("Hello", { //props })
Toast.warning("Hello", { //props })
Toast.error("Hello", { //props })
```

props:

```ts
export interface ToastProps {
  type?: Type;
  content?: string;
  duration?: number;
  closable?: boolean;
  frozenOnHover?: boolean;
  count?: 0;
  onClose?: () => void;
}
```

Toast 方法不仅可以在 Vue 单组件中使用,理论上在任何地方均可使用。

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

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

#### Screenshots:

<img width="752" alt="image" src="https://user-images.githubusercontent.com/21301288/196099183-09e64daf-0077-4373-9603-5d4349dfce3d.png">

#### Special notes for your reviewer:

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

测试方式:

https://halo-admin-ui-git-fork-ruibaby-feat-toast-component-halo-dev.vercel.app/story/src-components-toast-toast-story-vue?variantId=_default

测试功能是否正常。

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

```release-note
添加 Toast 组件
```
2022-10-17 06:09:38 +00:00