#### 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
```
#### 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
```
#### What type of PR is this?
/kind bug
/milestone 2.0
#### What this PR does / why we need it:
修复因为 https://github.com/halo-dev/console/pull/703 中添加了 Loading 动画但是没有考虑到定时刷新列表导致页面闪动的问题。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:删除任意资源,检查列表定时刷新的时候是否出现 loading 状态。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### 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
```
#### 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
附件管理支持未分组的筛选条件。
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
优化文章管理的分类/标签/作者的筛选下拉框样式,以及支持搜索。
#### Screenshots:
<img width="525" alt="image" src="https://user-images.githubusercontent.com/21301288/203499340-b7c59b2f-9be8-4804-9e21-9c5bfbca99bc.png">
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:检查文章管理的分类 / 标签 / 作者筛选功能是否正常。
#### Does this PR introduce a user-facing change?
```release-note
优化文章管理的分类/标签/作者的筛选下拉框样式,以及支持搜索。
```
#### 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
优化列表的加载,添加加载动画,解决加载完成之后界面闪动的问题。
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
使用 Pinia 管理已授权用户信息,并提供判断是否是 `anonymousUser` 的方式。
适配 https://github.com/halo-dev/halo/pull/2729
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试流程:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2729 的分支。
2. 测试 Console 端的登录、退出等流程。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
优化 Console 数据列表的筛选标签样式,以及支持清空所有筛选条件。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2657
#### Screenshots:
<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/203353043-b5e7631f-cc02-4368-b770-42b53e1dbf78.png">
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 测试文章、自定义页面、附件、插件、评论管理中的筛选功能。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 数据列表的筛选标签样式,以及支持清空所有筛选条件。
```
#### 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 异常。
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
完善 Console 中表单的验证规则。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2733
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
完善 Console 中表单的验证规则。
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
文章和独立页面的编辑页面支持 `returnTo` 参数,用于指定发布完成之后的跳转地址。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2724
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 选择任意文章进入编辑页面。
2. 在地址栏添加 `&returnTo=http://localhost:8090`
3. 发布文章,观察是否跳转到了 `http://localhost:8090`
#### Does this PR introduce a user-facing change?
```release-note
文章和独立页面的编辑页面支持 `returnTo` 参数。
```
#### 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
```
#### 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
优化文章和自定义页面的保存内容和发布逻辑。
```
#### 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
支持删除附件分组和存储策略。
```
#### 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
```
#### 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
附件管理支持排序筛选
```
#### 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
更新所有依赖的修订版本。
```
#### 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
```
#### 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
```
#### 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
```
#### 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
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
重构获取系统初始化状态的方式,之前会在每个路由切换前获取,在一定程度上会导致路由切换时卡顿。此 PR 改为仅在首次加载页面的时候调用接口获取,并保留状态由 pinia 管理。
#### Special notes for your reviewer:
测试方式:
1. 需要使用未初始化的 Halo。
2. 测试在未初始化前是否会自动切换到初始化页面。
3. 测试初始化之后是否还会跳转到初始化页面。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### 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
重构主题预览弹框,支持选择主题以及针对主题进行设置。
```
#### 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
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
修复一些因使用不当导致的 Vue warn。
#### Screenshots:
<img width="832" alt="image" src="https://user-images.githubusercontent.com/21301288/199663758-e29f48c4-0c33-4c78-913f-2364ce4b5fbe.png">
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
支持管理已删除的文章和自定义页面,优化删除的逻辑。
Fixes https://github.com/halo-dev/halo/issues/2647
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2648
2. 测试文章和自定义页面的删除功能,以及回收站的管理功能。
#### Does this PR introduce a user-facing change?
```release-note
支持管理已删除的文章和自定义页面,优化删除的逻辑。
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
添加选择附件类型的 FormKit 输入框。
在 Vue 单组件中使用:
```vue
<script lang="ts" setup>
const logo = ref("")
</script>
<template>
<FormKit
v-model="logo"
label="Logo"
type="attachment"
validation="required"
/>
</template>
```
在 FormKit Schema 中使用(插件 / 主题设置表单定义):
```yaml
- $formkit: attachment
name: logo
label: Logo
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2558
#### Screenshots:
<img width="671" alt="image" src="https://user-images.githubusercontent.com/21301288/198980581-ba90ec32-f205-4d03-8546-3c93238298e7.png">
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
添加选择附件类型的 FormKit 输入框。
```
#### 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
```
#### What type of PR is this?
/kind bug
/milestone 2.0
#### What this PR does / why we need it:
修复在 `vite build` 之后无法加载 Logo 的问题。
#### Special notes for your reviewer:
测试方式:
1. `pnpm build`
2. `pnpm preview`
3. 检查登录页面的 Logo 是否正常加载。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### 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
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
以 inline svg 的形式加载 Logo,解决因为加载 svg 文件导致的页面抖动问题。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:检查登录页面、初始化页面、侧边菜单顶部的 Logo 是否加载正常。
#### Does this PR introduce a user-facing change?
```release-note
以 inline svg 的形式加载 Logo,解决因为加载 svg 文件导致的页面抖动问题。
```
#### What type of PR is this?
/kind feature
/milestone 2.0
#### What this PR does / why we need it:
优化部分数据列表的逻辑,支持在检测出有正在删除的数据时,自动定时刷新列表。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 进入任意一个数据列表,比如文章。
2. 删除一个文章,观察是否有自动刷新列表。
3. 切换路由,检查自动刷新是否停止。
#### Does this PR introduce a user-facing change?
```release-note
优化部分数据列表的逻辑,支持在检测出有正在删除的数据时,自动定时刷新列表。
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
修正关于 Attachment 组件和编辑器组件的参数错别字。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
更新 [Repobeats analytics](https://repobeats.axiom.co/) 的图片源,之前因为修改仓库名,导致 Repobeats analytics 的统计失效。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
移除在 Git Commit 之前运行单元测试和类型检查的步骤。因为目前 main 分支处于保护分支,无法直接推送代码。所以仅在 PR 中的 Action 来运行这两个步骤即可。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
#### Does this PR introduce a user-facing change?
```release-note
None
```