Commit Graph

4241 Commits (3bfecd2b38ce182179604790a15de9a5e119a0e3)

Author SHA1 Message Date
Ryan Wang d38eceb82f feat: api client requests support configuring the mute parameter to hide exception toast (halo-dev/console#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
BugKing 5811261880
docs: remove the downloads badge in README (#2840)
#### What type of PR is this?

/kind documentation

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

鉴于目前已不在 Release 中提供 Jar 包下载,Releases 下载数量的展示已经没有太大意思,所以去掉了 README 中的 Releases 下载数量徽章。

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

```release-note
None
```
2022-12-05 09:06:12 +00:00
John Niang 5980b5b4be
Fix the problem that MySQL complains "Data too long for column 'data' at row 1" (#2833)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0.1

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

See https://github.com/halo-dev/halo/issues/2832 and https://github.com/halo-dev/halo/issues/2832#issuecomment-1336616901 for more.

For a workaround, please refer to:
- https://github.com/halo-dev/halo/issues/2832#issuecomment-1336610679

But, there are still limitations here:
- For MySQL: ~4GB
- For PosgreSQL: ~1GB

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

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

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

```release-note
修复因文章过长导致无法保存数据的问题
```
2022-12-05 03:32:11 +00:00
ZXSheng 619b0b33e7 perf: add autofocus to login username input (halo-dev/console#742)
#### 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/2779

#### Screenshots:
![image](https://user-images.githubusercontent.com/28836989/204964637-07cb3b3f-efbe-4045-991e-a73698176dd1.png)


```release-note
Console 端登录页面支持自动聚焦输入框
```
2022-12-01 07:13:55 +00:00
Ryan Wang 0072363dee
docs: update readme for Halo 2.0.0 (#2808)
#### What type of PR is this?

/kind documentation

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

为 Halo 2.0 正式版本更新 README。

#### Special notes for your reviewer:

/hold

等待创建 2.0 的 release。

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

```release-note
None
```
2022-12-01 01:31:59 +00:00
Ryan Wang fc61a82f88 chore: release 2.0.0 (halo-dev/console#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 a1a53dae2f refactor: plugin extension points of console plugin (halo-dev/console#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 d6b22860a9 perf: refine setup data and logic of post publish (halo-dev/console#739)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

更新系统初始化数据的资源,主要为了适配 https://github.com/halo-dev/console/pull/730 的修改。

#### Special notes for your reviewer:

测试方式:

1. 准备全新的环境。
2. 启动之后初始化,检查初始数据是否正常。

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

```release-note
None
```
2022-11-30 17:13:50 +00:00
Ryan Wang 06030165f5 perf: hide toast on setup page (halo-dev/console#740)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

在首次初始化页面隐藏 `资源不存在` 的提示,这是由 https://github.com/halo-dev/console/pull/732 带来的问题。

#### Special notes for your reviewer:

测试方式:

1. 准备全新的环境。
2. 进入初始化页面,检查是否存在 `资源不存在` 的提示。

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

```release-note
None
```
2022-11-30 17:07:49 +00:00
John Niang 540cafcdbf
Allow migrating attachments from other places (#2807)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0.0

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

This PR provides an ability to migrate attachments from other places, like Halo 1.x or Wordpress.

We could simply configure resource mappings to support attachments migration:

```yaml
halo:
  attachment:
    resource-mappings:
      - pathPattern: /upload/**
        locations:
          - upload
          - migrate-from-1.x
      - pathPattern: /wp-content/uploads/**
        locations:
          - migrate-from-wp
```

Meanwhile, I refactored LocalAttachmentUploadHandler for managing attachments from migration in the future.

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

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

#### Special notes for your reviewer:

**Steps to test:**
1. Try to configure the resource mappings
2. Put some static resources into the corresponding location
3. Access it from Browser

At last, please make sure the functionalities of attachment are ok as before.

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

```release-note
None
```
2022-11-30 17:03:51 +00:00
guqing 68ccbb098b
refactor: plugin author to an object (#2806)
#### What type of PR is this?
/kind improvement
/area core
/kind api-change

#### What this PR does / why we need it:
将 Plugin 的 author 改为 Author 对象与主题保持一致。
移除了测试类中使用的 jar 文件,改为使用时压缩

⚠️ 此为破坏性更新,需要修改 Console 插件列表的展示,以及所有官方插件的 plugin.yaml

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
Require-user-change:将 Plugin 的 author 类型从 String 为 Author
```
2022-11-30 15:45:50 +00:00
Ryan Wang 5141648f52 refactor: plugin author field (halo-dev/console#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
liuchang_cloud 3c7f5bf0bc Fix rich editor tooltip typo for insert attachments button (halo-dev/console#734)
修复富文本组件的显示提示信息

Co-authored-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: John Niang <johnniang@riseup.net>
2022-11-30 23:00:37 +08:00
Ryan Wang 0f23066545 feat: add exception pages (halo-dev/console#735)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

完善 Console 端的 404/403 页面。

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

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

#### Screenshots:

<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/204723752-fa20d9c0-4cec-4d9f-8a8c-c4fa964e0e16.png">

#### Special notes for your reviewer:

None

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


```release-note
完善 Console 端的 404/403 页面。
```
2022-11-30 14:57:53 +00:00
Ryan Wang 3dfbda3f59 refactor: widgets of dashboard page (halo-dev/console#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
John Niang 9f3c7ae378
Simplify MenuItem with targetRef instead of multi refs (#2799)
#### What type of PR is this?

/kind improvement
/kind api-change
/area core
/milestone 2.0.x

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

Two things this PR does:

1. **Simplify MenuItem with targetRef instead of multi refs**
2. Organize extensions with group `content.halo.run` into content folder

> **Warning** The first thing has some break changes about structure of MenuItem, please @halo-dev/sig-halo-console be aware of that.

Before:

```java
        @Schema(description = "Category reference.")
        private Ref categoryRef;

        @Schema(description = "Tag reference.")
        private Ref tagRef;

        @Schema(description = "Post reference.")
        private Ref postRef;

        @Schema(description = "SinglePage reference.")
        private Ref singlePageRef;
```

After:

```java
        @Schema(description = "Target reference. Like Category, Tag, Post or SinglePage")
        private Ref targetRef;
```

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

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

#### Special notes for your reviewer:

Because this PR contains break changes, we cannot test it in console directly.

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

```release-note
None
```
2022-11-30 13:43:49 +00:00
Ryan Wang 63bf99b308
chore: update default theme package (#2805)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

更新默认主题的安装包。 https://github.com/halo-dev/theme-earth/releases/tag/v1.0.0

#### Special notes for your reviewer:

测试方式:

1. 使用全新的环境启动此 PR。
2. 插件默认主题是否正确初始化。

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

```release-note
None
```
2022-11-30 10:51:46 +00:00
guqing bd02d9bb3b
chore: temporarily disable JWT authentication function (#2804)
#### What type of PR is this?
/kind improvement
/area core
/kind api-change

#### What this PR does / why we need it:
- 暂时关闭 JWT 认证功能,`POST /api/auth/token` API 将失效。
- 移除  `halo.security.oauth2.jwt` 配置,公私钥放在 classpath 只是之前还没有 halo work dir 时的临时方案
- Disable  JWT 相关的单元测试

后续会 Revert 此 PR。

#### Special notes for your reviewer:
how to test it?
1. 期望 `/api/auth/token` 失效
2. 期望 Console 登录功能没问题

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-11-30 10:21:47 +00:00
ZXSheng 628f625cd5 feat: post editing pages support caching of content to the browser (halo-dev/console#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 b8f9bb0da4 feat: add global request error toast (halo-dev/console#732)
#### 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/2370

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

```release-note
添加全局的请求异常提示。
```
2022-11-30 06:19:46 +00:00
Ryan Wang 0347de6f15 refactor: remove the option to make the post internally accessible to members (halo-dev/console#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
John Niang 5aff60d5b4
Fix an optimistic lock error always appearing when restarting Halo (#2795)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0.x

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

This PR only do one improvement for reconciling Role. I always fetch the latest data and compare the difference between the latest and current, and then decide whether to update based on the result.

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

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

#### Special notes for your reviewer:

Steps to test:

1. Restart Halo multiple times and see the log

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

```release-note
None
```
2022-11-30 03:51:47 +00:00
Ryan Wang ebeba0fb52 refactor: simplify MenuItem with targetRef instead of multi refs (halo-dev/console#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
guqing 9d60b8ae06
feat: theme templates support global seo settings (#2801)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0-rc.2

#### What this PR does / why we need it:
适配 SEO 系统设置,此功能之前遗漏

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

Fixes #2797

#### Special notes for your reviewer:
how to test it?
1. seo 设置禁用搜索引擎,会在所有页面的 head 添加 `<meta name="robots" content="noindex" />`
2. seo 设置填写`关键词`和`描述`会在所有页面的 head 标签填充 `<meta name="xxx> content="xxx" />` 

/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?

```release-note
支持 SEO 全局系统设置
```
2022-11-30 02:31:46 +00:00
Ryan Wang 9f23b78fd9 refactor: simplify references in Attachment (halo-dev/console#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
John Niang eefdd27c44
Simplify references in Attachment (#2800)
#### What type of PR is this?

/kind improvement
/kind api-change
/area core
/milestone 2.0.x

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

This PR replace refs in Attachment extension with simple name.

> **Warning** Please @halo-dev/sig-halo-console be aware of that this PR contains break changes, so that we can not use Attachment feature in the console directly. The console has to adapt the break changes.

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

```release-note
None
```
2022-11-30 02:23:46 +00:00
Ryan Wang 43d7765347 fix: the issue that post publishTime cannot be set and displayed back (halo-dev/console#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 540a488d5b chore: release 2.0.0-rc.2 (halo-dev/console#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 d3060f61d3 perf: allow clicking on the link address of the data list (halo-dev/console#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 20a55aa016 feat: support for opening login modal after login session expiration (halo-dev/console#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 7d004e33d4 fix: the issue that role edit form cannot be submitted in the permission tab (halo-dev/console#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 9fc27a01e6 fix: issue of uploading attachments to ungrouped group (halo-dev/console#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 95ee267117 feat: set the approvedTime field during approve (halo-dev/console#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 086155d6f8 feat: post list supports displaying the pinned status (halo-dev/console#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
John Niang 5be038834e
Fix the problem that lucene crashes when searching for posts (#2791)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.0.0-rc.2

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

This PR mainly refactor PostEventListener into PostEventReconciler to reconcile post events synchronously. After that, the concurrent issue will be gone.

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

Fixes https://github.com/halo-dev/halo/issues/2756
Fixes https://github.com/halo-dev/halo/issues/2757

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

```release-note
None
```
2022-11-28 11:28:19 +00:00
Ryan Wang a4a6ff42a6 perf: remove the list of users under role details (halo-dev/console#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 99b2966ac1 fix: the issue that the menu is not updated after the menu item is deleted (halo-dev/console#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 23838d5236 perf: formkit post input type only queries the available (halo-dev/console#724)
#### What type of PR is this?

/kind improvement
/milestone 2.0.0-rc.2

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

FormKit 的文章和自定义页面选择器仅查询可用的文章或自定义页面。

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

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

#### Special notes for your reviewer:

测试方式:

1. 创建若干文章和自定义页面,然后删除一部分,再将一部分设置为未发布。
2. 进入菜单管理新建菜单项,选择文章或者自定义页面类型。
3. 检查是否包含被删除或者未发布的文章和自定义页面。

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


```release-note
None
```
2022-11-28 11:24:21 +00:00
Ryan Wang 05b21c225f chore: bump @halo-dev/richtext-editor to support more features (halo-dev/console#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 bf1ef171d0 feat: add support for automatic label color calculation for post tags (halo-dev/console#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 569cea4ab8
Refine configuration for dev profile (#2753)
#### What type of PR is this?

/kind improvement

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

1. 增加console代理配置,默认代理到`http://localhost:3000/`。
2. 增加用户名密码初始化配置。
3. 增加win profile,指定与dev profile中不同的r2dbc url,windows环境下调试时可以使用 `dev,win` profile。

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

```release-note
None
```
2022-11-28 06:26:16 +00:00
BugKing 00aa964fb3 perf: unify the copywriting style of confirms (halo-dev/console#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
guqing de983a2e46
refactor: cannot reload when settingName is not configured before (#2745)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0-rc.1
/kind api-change

#### What this PR does / why we need it:
- 修复 theme.yaml 之前没有配置过 settingName 会无法 reload 的问题
- 将 `/themes/{name}/reload-setting` 的 API 修改为 `/themes/{name}/reload`

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

Fixes #2735

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
修复 theme.yaml 之前没有配置过 settingName 会无法 reload 的问题
```
2022-11-28 03:00:17 +00:00
Ryan Wang c21b0fdfe8 chore: bump @halo-dev/api-client for reload theme api (halo-dev/console#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 4f4f35c67f
chore: update issue templates for Halo 2.0 (#2788)
#### What type of PR is this?

/kind improvement

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

为 Halo 2.0 更新 issue 模板。

#### Special notes for your reviewer:

效果可以查看:

- https://github.com/ruibaby/halo/issues/new?assignees=&labels=bug&template=bug_report.zh.yml
- https://github.com/ruibaby/halo/issues/new?assignees=&labels=&template=feature_request.zh.yml

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

```release-note
None
```
2022-11-28 01:36:17 +00:00
Ryan Wang ff236810d9 chore: bump @halo-dev/richtext-editor version (halo-dev/console#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 cedb351156 chore: add @Aanko to reviewer list (halo-dev/console#714)
#### What type of PR is this?

/kind improvement

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

将 @Aanko 添加到 Reviewer 列表。

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

```release-note
None
```
2022-11-26 02:56:10 +00:00
John Niang 145cfb88b7
Delegate ReactiveExtensionClient for default implementation of ExtensionClient (#2774)
#### What type of PR is this?

/kind bug
/kind cleanup
/area core

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

This PR fully delegates ReactiveExtensionClient for default implementation of ExtensionClient and remove old implementation, including its tests. The main reason I delegate is for keeping consistent about implementation of ExtensionClient.

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

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

#### Special notes for your reviewer:

You can test full functions after starting Halo with current changes.

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

```release-note
None
```
2022-11-25 13:41:25 +00:00
guqing 21c18d4b9a
feat: add approvedTime for comment and reply (#2746)
#### What type of PR is this?
/kind feature
/milestone 2.0.0-rc.1
/kind api-change
/area core

#### What this PR does / why we need it:
评论和回复新增 approvedTime 属性
1. 此属性在创建时如果是不需要审核就公开的则会填充当前时间
2. 目前没有审核功能,审核是 Console 端去更新的 approved 字段,因此需要更新 approved 时判断有没有设置 approvedTime 没有则填充当前时间,后续有审核功能后则再由后端处理

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

Fixes #2738

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
评论和回复新增 approvedTime 属性
```
2022-11-25 13:33:25 +00:00
John Niang 0df7857ef8
Refactor reconcilers registration (#2737)
#### What type of PR is this?

/kind cleanup
/kind improvement
/area core
/milestone 2.0.0

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

This PR mainly refactors registration of reconcilers to register reconciler more convinient. After that, it is possible to reigster and start reconciler in plugin.

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

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

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

```release-note
None
```
2022-11-25 11:13:09 +00:00