Commit Graph

331 Commits (e3e0ddc95a5de2501f48848c388efead5646e06f)

Author SHA1 Message Date
Ryan Wang de2612da27
fix: pages using tanstack query cannot be loaded in production build (#889) 2023-02-24 19:01:47 +08: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 816feb9937
refactor: use tanstack query to refactor plugins fetching (#876)
#### What type of PR is this?

/kind improvement

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

使用 [TanStack Query](https://github.com/TanStack/query) 重构插件管理列表的数据请求相关逻辑。

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

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

#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 插件管理页面,安装若干插件。
3. 测试分页、条件筛选等逻辑是否正常。

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

```release-note
None
```
2023-02-22 08:00:12 +00:00
Ryan Wang c03ea64bf2
feat: provide Chinese translation for the system's role template (#870)
#### What type of PR is this?

/kind feature

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

为系统内提供的角色模板提供中文翻译。

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

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

#### Screenshots:

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


#### Special notes for your reviewer:

测试方式:

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

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

```release-note
Console 端为系统内提供的角色模板提供中文翻译
```
2023-02-21 05:16:10 +00:00
Ryan Wang b949a25558
chore: move @halo-dev/api-client package to console (#854)
#### What type of PR is this?

/kind improvement

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

将 https://github.com/halo-sigs/api-client 移动到 Console 的仓库进行管理。

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

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

#### Special notes for your reviewer:

测试方式:

1. 需要先 `pnpm install && pnpm build:packages`
2. 测试开发环境(pnpm dev)和构建之后(pnpm build)是否能够正常使用。

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

```release-note
None
```
2023-02-17 06:30:13 +00:00
Ryan Wang 561b8da237
chore: release 2.2.0 (#835)
#### What type of PR is this?

/kind improvement

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

发布 Console 2.2.0

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


```release-note
None
```
2023-02-01 02:52:10 +00:00
Ryan Wang 8f6d543f4d
feat: default editor supports pasting or dragging pictures to upload (#825)
#### What type of PR is this?

/kind feature

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

添加复制或者拖拽图片到编辑器上传的支持。

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

Fixes https://github.com/halo-dev/halo/issues/3109
Fixes https://github.com/halo-dev/halo/issues/2946

#### Screenshots:


#### Special notes for your reviewer:

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


```release-note
Console 端的默认编辑器支持拖拽或者粘贴图片上传
```
2023-02-01 02:50:10 +00:00
Ryan Wang d51713ec27
chore: bump @halo-dev/richtext-editor to supports more feature about media (#834)
#### What type of PR is this?

/kind feature

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

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

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

#### Special notes for your reviewer:

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

```release-note
升级 Console 端默认编辑器版本,以支持图片位置和大小设置、插入音视频等功能。
```
2023-01-31 14:10:09 +00:00
Ryan Wang 6c7b48b086
refactor: change api of fetching post and singlepage content (#828)
#### What type of PR is this?

/kind improvement

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

修改获取文章和自定义页面内容的 API,用于适配:https://github.com/halo-dev/halo/pull/3168

#### Special notes for your reviewer:

测试方式:

1. 测试文章和自定义页面编辑时,能否正常获取内容即可。

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

```release-note
None
```
2023-01-31 02:52:09 +00:00
Ryan Wang 4c8bb05c31
feat: add supports for automatic slug generation (#831)
#### What type of PR is this?

/kind feature
/milestone 2.2.x

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

文章、独立页面、分类、标签支持自动生成别名。

策略:

1. 仅在创建时会自动根据标题或者名称自动生成别名,编辑时如果需要重新生成,可以点击输入框右侧的按钮。
2. 中文会被转为拼音并用 - 隔开,需要注意多音字的情况,目前无法保证多音字是否符合预期。
3. 使用了 https://www.npmjs.com/package/transliteration 库。

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

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

#### Screenshots:

<img width="782" alt="image" src="https://user-images.githubusercontent.com/21301288/213849446-18d70974-7b2c-420c-bd50-93d2c3193895.png">

#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
4. 测试文章、独立页面、分类、标签创建时,是否可以自动设置别名。
5. 测试别名输入框右侧的生成别名按钮是否正常工作。
6. 测试分类和标签选择器创建新分类或标签时,是否正确设置了别名。

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

```release-note
Console 端的文章、独立页面、分类、标签支持自动生成别名
```
2023-01-30 06:52:11 +00:00
Ryan Wang 0fa6909a8f
feat: update theme requires field and supports show failed message (#826)
#### What type of PR is this?

/kind feature

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

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

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

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

#### Screenshots:

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

#### Special notes for your reviewer:

测试方式:

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

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

```release-note
Console 端支持显示主题的版本异常信息
```
2023-01-19 02:58:14 +00:00
Ryan Wang 6e6b35b252
chore: bump vite version to 4 (#819)
#### What type of PR is this?

/kind improvement

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

升级 Vite 到 Vite 4,请看:

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

无破坏更新。

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

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

#### Special notes for your reviewer:

测试方式:

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

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

```release-note
升级 Console 项目的 Vite 版本到 Vite 4
```
2023-01-13 05:30:11 +00:00
Ryan Wang ee660d77e2
chore: release 2.1.0 (#811)
#### What type of PR is this?

/kind improvement

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

发布 Console 2.1.0

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

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

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

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

/kind feature

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

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

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

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

#### Screenshots:

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


#### Special notes for your reviewer:

测试方式:

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

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

```release-note
菜单项支持设置打开方式
```
2022-12-29 13:50:33 +00:00
Ryan Wang 4661c5ed66
fix: logged-in users cannot access the profile page (#796)
#### 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/3027

#### Special notes for your reviewer:

/hold

等待 https://github.com/halo-dev/halo/issues/3035 解决。

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


```release-note
修复 Console 端已登录用户无法访问个人资料页面的问题。
```
2022-12-29 13:04:32 +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 d60931bae5
feat: add AnnotationsForm Component to edit extension annotations (#770)
#### What type of PR is this?

/kind feature

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

提供一个 Annotations 编辑组件,支持由主题或者插件提供表单定义,也支持使用者自定义 key-value,用于扩展资源字段。

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

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

#### Screenshots:

<img width="789" alt="image" src="https://user-images.githubusercontent.com/21301288/209517622-80111fd2-8e79-480f-8ca0-9f7073300b2b.png">


#### Special notes for your reviewer:

测试方式:

1. 将一下内容放到任意一个主题下,后缀为 `yaml`,文件名随意。
    ```yaml
    spec:
      targetRef:
        group: content.halo.run
        kind: Post
      formSchema:
        - $formkit: "text"
          name: "download"
          label: "下载地址"
        - $formkit: "text"
          name: "version"
          label: "版本"
    apiVersion: v1alpha1
    kind: AnnotationSetting
    metadata:
      generateName: annotation-
    ```
3. 后端需要使用 https://github.com/halo-dev/halo/pull/3028
4. 测试为文章设置 Annotations 和自定义的 Annotations。
5. 检查是否可以设置正常。


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

```release-note
文章设置支持设置元数据。
```
2022-12-26 14:08:32 +00:00
Ryan Wang a48c33d9ba
refactor: remove the ability to edit user using yaml (#799)
#### What type of PR is this?

/kind improvement

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

移除使用 yaml 编辑用户信息的功能。

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

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

#### Special notes for your reviewer:

None

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

```release-note
移除 Console 端使用 yaml 编辑用户信息的功能
```
2022-12-26 10:36:32 +00:00
Ryan Wang 0a7cbd3018
feat: add support for resetting configmap of plugin and theme (#777)
#### What type of PR is this?

/kind feature

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

支持重置主题和插件的设置选项。适配 https://github.com/halo-dev/halo/pull/2964

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

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

#### Screenshots:

<img width="366" alt="image" src="https://user-images.githubusercontent.com/21301288/208022668-288fb8c5-ddd1-456c-9633-ec8865f3b1ba.png">

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有设置选项主题和插件。
2. 进入主题和插件设置,改变部分设置并保存。
3. 重置主题和插件的设置,然后进入设置表单,检查是否已经恢复为了默认。

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

```release-note
支持重置主题和插件的设置选项。
```
2022-12-19 08:25:47 +00:00
Ryan Wang c95af5bad1
chore: bump @halo-dev/richtext-editor to fix iframe display and add HTML syntax highlighting (#773)
#### What type of PR is this?

/kind improvement

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

升级 `@halo-dev/richtext-editor` 版本,解决以下问题:

1. 修复嵌入网页不会回显的问题。 c8cfe8f7b1
2. 添加 HTML 语法的代码块高亮。 8d27ae81ee

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

Fixes https://github.com/halo-dev/halo/issues/2924
Fixes https://github.com/halo-dev/halo/issues/2913

#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 插件编辑器的代码块是否有 HTML 语言选项。
3. 插入一个嵌入网页的编辑块,保存文章之后再次进入编辑页面,检查加载是否正常。

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

```release-note
None
```
2022-12-16 03:08:12 +00:00
wzrove 4a5d95706e
chore: use lint-staged to improve dx (#768)
#### What type of PR is this?

/kind improvement


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

优化创建 commit 前的 prettier 和 ESLint 流程,使用 [lint-staged](https://www.npmjs.com/package/lint-staged),可以仅处理在 Git 缓存区的文件。

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

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

#### Screenshots:

#### Special notes for your reviewer:

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


```release-note
None
```
2022-12-13 15:38:48 +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 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 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 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 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 d4b7c23f53
chore: bump @halo-dev/richtext-editor to support more features (#722)
#### What type of PR is this?

/kind improvement
/milestone 2.0.0-rc.2

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

升级 `@halo-dev/richtext-editor`。

1. 支持在工具栏显示有序列表、无序列表、任务列表的按钮。
2. 为工具栏的按钮添加 tooltip 提示。
3. 在工具栏添加高亮文字的按钮。
4. 在快捷操作列表添加有序列表、无序列表、任务列表、表格、普通文本的操作项。
5. 修复编辑器文字过长导致的布局问题。 Fixes https://github.com/halo-dev/halo/issues/2722

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

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

#### Screenshots:

<img width="1376" alt="image" src="https://user-images.githubusercontent.com/21301288/204190762-5fba0bc6-5f15-4283-881a-cc90abd754df.png">

#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 测试上述功能是否正常。

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

```release-note
Console 端编辑器的工具栏支持列表、文字高亮等功能。
```
2022-11-28 11:22:25 +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 ba81da7f7a
chore: bump @halo-dev/richtext-editor version (#719)
#### What type of PR is this?

/kind improvement
/milestone 2.0.0-rc.2

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

升级 `@halo-dev/richtext-editor` 版本以支持图片放大缩小、嵌入网页、表格。

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

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

#### Screenshots:

<img width="1377" alt="image" src="https://user-images.githubusercontent.com/21301288/204129594-6b4c2b4e-4eb4-4cf5-b1ca-39097843fadf.png">
<img width="1375" alt="image" src="https://user-images.githubusercontent.com/21301288/204129660-e7c415eb-db70-405b-97cc-2ed05bcaa034.png">


#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 测试编辑器的图片放大缩小、嵌入网页、表格等功能。

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

```release-note
Console 端编辑器支持图片放大缩小、嵌入网页、表格。
```
2022-11-28 01:34:16 +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 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 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 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 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 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 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 fe89862552
refactor: remove formkit auto-animate addon (#687)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

移除 FormKit 的 Auto Animate 扩展,因为如果使用了这个扩展,在动态加载表单元素的时候可能会导致 UI 大范围的抖动。而且此扩展比较不可控,无法对其表现进行修改。

#### Screenshots:

before:

![2022-11-10 12 00 58](https://user-images.githubusercontent.com/21301288/200997699-af36cd8c-e56d-4d3b-a4ea-f4d34bfb6903.gif)

![2022-11-10 12 02 23](https://user-images.githubusercontent.com/21301288/200997830-0b2539c8-214f-4399-a33e-c2ebd02f1e93.gif)


#### Special notes for your reviewer:

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

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

```release-note
移除表单中的动画效果
```
2022-11-11 14:02:11 +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 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 c0f82572e3
refactor: update the field of the plugin logo (#678)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修改插件 Logo 的使用字段为 `status.logo`。用于适配 https://github.com/halo-dev/halo/pull/2652

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

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

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/199447142-0c90b200-3976-498e-88e1-dd3c5377ab73.png">

#### Special notes for your reviewer:

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

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2652 分支。
2. 检查插件列表的 Logo 是否显示正常。

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

```release-note
None
```
2022-11-03 02:50:17 +00:00
Ryan Wang ff26058fc0
feat: add setup post/singlePage/category custom templates support (#671)
#### 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/2638

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

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

#### Screenshots:

<img width="625" alt="image" src="https://user-images.githubusercontent.com/21301288/198823380-991a702d-aae7-4587-b0f8-81fcb018a1f6.png">

#### Special notes for your reviewer:

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

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2638 PR 的分支。
2. 根据 https://github.com/halo-dev/halo/pull/2638 PR 中的描述修改主题配置 `theme.yaml`,添加所需测试的模板配置。
3. 检查 Console 对应的设置项(分类编辑、文章设置、自定义页面)中的自定义模板选择框是否包含配置的模板。
4. 选择配置的模板后保存。检查主题端对应页面是否一致。

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

```release-note
支持为文章/自定义页面/分类设置自定义模板。
```
2022-11-02 06:40: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