Commit Graph

1612 Commits (main)

Author SHA1 Message Date
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 d575b6698b
perf: remove permalink of deleted single page (#792)
#### What type of PR is this?

/kind improvement

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

移除自定义页面回收站中自定义页面的固定链接跳转入口。

#### Screenshots:

<img width="515" alt="image" src="https://user-images.githubusercontent.com/21301288/209045397-14a63c58-5f9f-49a4-8d4b-ed0e78496cda.png">


#### Special notes for your reviewer:

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


```release-note
None
```
2022-12-22 04:12:30 +00:00
Ryan Wang ed07cd2958
fix: system settings form could not be loaded (#787)
#### 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/3001

#### Special notes for your reviewer:

测试方式:

1. 测试系统设置页面的选项卡切换和保存功能。

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

```release-note
修复 Console 端系统设置页面切换选项卡无法正常加载表单的问题。
```
2022-12-20 11:44:29 +00:00
Ryan Wang ca4749432e
perf: add more operation feedback prompt (#785)
#### 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/2979

#### Special notes for your reviewer:

测试方式:

1. 测试 Console 端所有页面的操作。
2. 观察是否有反馈。

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

```release-note
完善 Console 端的部分操作反馈提示
```
2022-12-20 11:04:29 +00:00
Ryan Wang 2c3147a5a2
fix: the flickering issue of tooltip (#782)
#### What type of PR is this?

/kind improvement

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

修复 `v-tooltip` 指令的元素闪烁问题。

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

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

#### Screenshots:

![2022-12-19 21 52 11](https://user-images.githubusercontent.com/21301288/208441007-2bffe6f6-0b48-4a90-86a0-31ce622f04bf.gif)

#### Special notes for your reviewer:

测试方式:

1. 创建一篇文章,仅保存不发布。
2. 回到文章管理列表,可以看到标题旁边有一个状态点,鼠标移入会显示提示。
3. 观察是否出现闪烁的问题。

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

```release-note
优化 Console 端状态提示的样式
```
2022-12-20 02:25:42 +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 57f4f2226f
perf: merge plugin uninstallation options button (#779)
#### 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/2978

#### Screenshots:

before:

![image](https://user-images.githubusercontent.com/21301288/208060524-fa9de196-ccd2-43dc-82e7-21eefddec44b.png)


after:

<img width="466" alt="image" src="https://user-images.githubusercontent.com/21301288/208060456-77514178-1935-43f4-9d50-13bc606d5573.png">


#### Special notes for your reviewer:

测试方式:

1. 测试插件卸载的两种选项是否功能正常。

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

```release-note
优化 Console 端的插件卸载选项布局
```
2022-12-19 03:26:10 +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 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
Ryan Wang 19fdf2564e
docs: update github workflow badge (#775)
#### What type of PR is this?

/kind improvement

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

<img width="585" alt="image" src="https://user-images.githubusercontent.com/21301288/208009902-aa2b9139-b0e4-48a1-92f4-964242ae14cf.png">

see https://github.com/badges/shields/issues/8671

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


```release-note
None
```
2022-12-16 02:54:11 +00:00
Ryan Wang 6ac0816380
feat: add enable and upgrade support for theme list (#774)
#### What type of PR is this?

/kind improvement

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

1. 在主题管理列表添加启用和升级的支持。
2. 优化主题页面右上角的按钮布局
3. 优化主题管理的代码结构。

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

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

#### Screenshots:

<img width="1515" alt="image" src="https://user-images.githubusercontent.com/21301288/207893631-6db10293-d0ee-4af4-9c43-f137055df28e.png">
<img width="1665" alt="image" src="https://user-images.githubusercontent.com/21301288/207894016-dd1a5d27-9fff-4211-8869-381208932eaf.png">


#### Special notes for your reviewer:

测试方式:

1. 进入主题管理,点击右上角的主题管理。
4. 测试单个主题的启用和升级是否符合预期。

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

```release-note
Console 端的主题管理列表添加启用和升级的支持。
```
2022-12-16 02:46:11 +00:00
wzrove 75f2cb0540
feat: stop Implicit submission (#766)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind feature
/area console
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
阻止表单的[隐式提交](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission)

>For the purpose of the previous paragraph, an element is a field that blocks implicit submission of a element if it is an element whose [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) is that element and whose attribute is in one of the following states: [Text](https://html.spec.whatwg.org/multipage/input.html#text-(type=text)-state-and-search-state-(type=search)), [Search](https://html.spec.whatwg.org/multipage/input.html#text-(type=text)-state-and-search-state-(type=search)), [URL](https://html.spec.whatwg.org/multipage/input.html#url-state-(type=url)), [Telephone](https://html.spec.whatwg.org/multipage/input.html#telephone-state-(type=tel)), [Email](https://html.spec.whatwg.org/multipage/input.html#email-state-(type=email)), [Password](https://html.spec.whatwg.org/multipage/input.html#password-state-(type=password)), [Date](https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date)), [Month](https://html.spec.whatwg.org/multipage/input.html#month-state-(type=month)), [Week](https://html.spec.whatwg.org/multipage/input.html#week-state-(type=week)), [Time](https://html.spec.whatwg.org/multipage/input.html#time-state-(type=time)), [Local Date and Time](https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local)), [Number](https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number))

当form的子元素只有一个且tyep为 ` "text","search","url","email","password","date","month","week","time","datetime-local","number"`其中任一。 阻止键入`enter` 触发`submit` ,做法是在from表单上监听键盘事件,然后阻止。

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

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/2893

#### Screenshots:

<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.
eg.
Before:
![screenshot-before](https://user-images.githubusercontent.com/screenshot.png)
After:
![screenshot-after](https://user-images.githubusercontent.com/screenshot.png)
-->

#### Special notes for your reviewer:

+ 进入[测试页面](https://formkit.com/playground?fkv=1.0.0-beta.12&fileTab=Playground.vue&files=JTVCJTdCJTIybmFtZSUyMiUzQSUyMlBsYXlncm91bmQudnVlJTIyJTJDJTIyZWRpdG9yJTIyJTNBJTIyJTNDc2NyaXB0JTIwc2V0dXAlM0UlNUNuaW1wb3J0JTIwJTdCcmVmJTdEJTIwZnJvbSUyMCd2dWUnJTNCJTVDbmNvbnN0JTIwdHlwZUxpc3QlMjAlM0QlMjByZWYoJTVCJ2F1dG9jb21wbGV0ZSclMkMlMjAnYnV0dG9uJyUy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dmFibGUlMjIlM0F0cnVlJTJDJTIyYWRkZWQlMjIlM0F0cnVlJTdEJTVE&imports=JTdCJTIybmFtZSUyMiUzQSUyMkltcG9ydE1hcCUyMiUyQyUyMmVkaXRvciUyMiUzQSUyMiU3QiU1Q24lMjAlMjAlNUMlMjJ2dWUlNUMlMjIlM0ElMjAlNUMlMjJodHRwcyUzQSUyRiUyRmNkbi5qc2RlbGl2ci5uZXQlMkZucG0lMkZ2dWUlNDAzJTJGZGlzdCUyRnZ1ZS5lc20tYnJvd3Nlci5taW4uanMlNUMlMjIlNUNuJTdEJTVDbiUyMiU3RA)
+ 点击表单元素,表单元素聚焦之后,之后键入`enter`观察是否触发`submit`
+ 打开`formkit.config.js`tab, 放开注释,阻止事件行为。重复第二点。观察`submit`事件。
#### 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
 禁止使用 Enter 提交,需要使用组合键(Ctrl + Enter)
```
2022-12-16 02:24:10 +00:00
Ryan Wang 101e91a761
perf: improve the prompt for upload failure of the upload component (#769)
#### 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/2933
Ref https://github.com/halo-dev/halo/issues/2932 https://github.com/halo-dev/halo/issues/2931

#### Screenshots:

<img width="794" alt="image" src="https://user-images.githubusercontent.com/21301288/207272593-b94efb0a-7033-4ec1-b1eb-f2e3871b34f0.png">
<img width="674" alt="image" src="https://user-images.githubusercontent.com/21301288/207272682-0c223d29-8c4f-45b0-a8d5-2432a97835c6.png">


#### Special notes for your reviewer:

测试方式:

1. 进入附件上传、插件安装、主题安装界面。
2. 上传不符合规则的文件,比如主题可以上传一个不是主题的 zip 或者 Halo 1.x 版本的 zip。
3. 观察是否有异常提示。

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

```release-note
优化 Console 端上传组件的异常提示信息。
```
2022-12-14 09:14:29 +00:00
Ryan Wang da24914275
chore: add @wzrove to reviewer list (#714) (#771)
#### What type of PR is this?

/kind improvement


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

将 @wzrove 添加到 Reviewer 列表。

贡献列表:

- https://github.com/halo-dev/console/pulls?q=+is%3Apr+author%3Awzrove+
- https://github.com/halo-dev/halo/issues?q=is%3Aissue+author%3Awzrove+

欢迎 @wzrove 加入,期望一起维护和审查保证 Console 的质量。

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

```release-note
None
```
2022-12-14 02:08:48 +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
wzrove f3ef88e0f3
fix: the global search keyboard event is not removed when the component is unmounted (#767)
#### What type of PR is this?
/kind bug

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


![image](https://user-images.githubusercontent.com/88016243/207133131-aa2404b1-c9d3-49fc-a1a7-949dd557e30c.png)

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

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

#### Special notes for your reviewer:

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

```release-note
None
```
2022-12-13 03:30:44 +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 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 8119e5a484
chore: remove build jobs of github action (#759) 2022-12-07 18:04:33 +08:00
Ryan Wang b60df29887
docs: update readme for Halo 2.0 (#758)
#### What type of PR is this?

/kind documentation

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

为 Halo 2.0 正式版更新 Readme。

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


```release-note
None
```
2022-12-07 09:58:53 +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
Ryan Wang 26ed1ecf04
fix: ui is not updated after the theme is activated in the production (#746)
#### 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/2850

#### Special notes for your reviewer:

测试方式:

1. 使用 `pnpm build` 构建此 PR。
2. 在 Halo 配置 `halo.console.location` 为 Console 项目的 dist 目录,比如:`file:/Users/ryanwang/Workspace/github/ruibaby/halo-console/dist/`
3. 安装若干主题,激活其中一个,检查页面 UI 元素是否更新。

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

```release-note
修复 Console 端激活主题之后页面没有更新数据的问题。
```
2022-12-07 02:50:53 +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
ZXSheng 08d0835634
perf: add autofocus to login username input (#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 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 7e2a2852ea
perf: refine setup data and logic of post publish (#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 97a8bd1075
perf: hide toast on setup page (#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
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
liuchang_cloud 2b7967a5dd
Fix rich editor tooltip typo for insert attachments button (#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 93e0bebddb
feat: add exception pages (#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 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 82988078e5
feat: add global request error toast (#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 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 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 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