Commit Graph

1411 Commits (913828413737fb4c44a7ec25d1023f9be07748c0)

Author SHA1 Message Date
Ryan Wang 9138284137
refactor: upload component changed from filepond to uppy (#666)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

使用 [uppy](https://github.com/transloadit/uppy) 代替原来的 [filepond](https://github.com/pqina/filepond)。

#### Screenshots:

<img width="1665" alt="image" src="https://user-images.githubusercontent.com/21301288/197812049-44dba688-673a-4636-9ec0-0acba6d9d68b.png">


#### Special notes for your reviewer:

测试方式:

1. Console 需要 `pnpm install`
2. 测试附件上传、主题/插件的安装和更新。

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

```release-note
使用 [uppy](https://github.com/transloadit/uppy) 代替原来的 [filepond](https://github.com/pqina/filepond)。
```
2022-10-26 04:40:10 +00:00
Ryan Wang ac660c2aa2
feat: add upgrade plugin support (#663)
#### 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/2624

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

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

#### Screenshots:
<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/197682557-7e37895e-a6b5-43d6-8d40-2a1c899b9ce1.png">
<img width="1662" alt="image" src="https://user-images.githubusercontent.com/21301288/197682572-4db39f09-efda-4928-9a6d-8593c7c0c790.png">


#### Special notes for your reviewer:

测试方式:

1. Halo 需要使用 https://github.com/halo-dev/halo/pull/2624 PR 的分支。
2. Console 需要 `pnpm install`
3. 修改已安装的插件,构建之后更新插件,检查是否更新成功。


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

```release-note
支持插件升级
```
2022-10-26 03:26:09 +00:00
Ryan Wang 5f5916fd7f
refactor: load the logo as an inline svg (#664)
#### 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 文件导致的页面抖动问题。
```
2022-10-26 03:10:14 +00:00
Ryan Wang 8b6c70e99d
feat: automatically refresh the list when it has data that is being deleted (#661)
#### 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
优化部分数据列表的逻辑,支持在检测出有正在删除的数据时,自动定时刷新列表。
```
2022-10-24 14:10:10 +00:00
Ryan Wang cbcdbf306c
typo: fix some typos about attachment and editor components (#662)
#### 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
```
2022-10-24 13:34:10 +00:00
Ryan Wang 274cb19fcf
feat: add preview theme support (#660)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

Ref https://github.com/halo-dev/halo/pull/2280

支持在 Console 预览主题。

#### Screenshots:

<img width="1920" alt="image" src="https://user-images.githubusercontent.com/21301288/197442483-e89b8c3c-441e-4668-9840-96fe741a1f95.png">


#### Special notes for your reviewer:

测试方式:进入主题管理,打开已安装主题列表,在每一项的更多按钮即可看到预览主题的按钮。

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

```release-note
支持在 Console 预览主题。
```
2022-10-24 10:54:10 +00:00
Ryan Wang a095c07ae1
docs: update repobeats analytics images source for readme file (#659)
#### 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 
```
2022-10-24 08:04:11 +00:00
Ryan Wang 8948a4ccf9
chore: remove the step to run unit tests and typecheck before git commit (#658)
#### 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
```
2022-10-24 03:22:10 +00:00
Ryan Wang f77ec61465
refactor: load the theme and plugin logos using the avatar component (#657)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

插件和主题管理的 Logo 改为使用 `Avatar` 组件。

#### Special notes for your reviewer:

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

测试方式:检查主题和插件相关的管理页面是否正常加载 Logo。

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

```release-note
插件和主题管理的 Logo 改为使用 `Avatar` 组件。
```
2022-10-24 03:20:12 +00:00
Ryan Wang 85c3096c29
feat: add a refresh button to the data list (#656)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

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

#### Screenshots:

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

#### Special notes for your reviewer:

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

测试方式:

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

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

```release-note
为部分功能数据列表添加刷新按钮。
```
2022-10-24 03:18:16 +00:00
Ryan Wang 48daa1a2a2
feat: add upgrade theme support (#653)
#### 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/2600

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

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

#### Screenshots:

<img width="915" alt="image" src="https://user-images.githubusercontent.com/21301288/196875056-cb0fbb7d-1cfd-47c3-ae6a-5e76c642b51d.png">
<img width="915" alt="image" src="https://user-images.githubusercontent.com/21301288/196875083-39e3778c-4925-4cb9-befc-563f40c77d06.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2600
2. 需要 `pnpm install`
3. 测试更主题功能是否正常。

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

```release-note
支持升级主题。
```
2022-10-24 03:16:20 +00:00
Ryan Wang 544b853201
chore: bump packages version (#654)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

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

#### Special notes for your reviewer:

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

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


```release-note
None
```
2022-10-24 02:26:09 +00:00
Ryan Wang 31177cde6f
chore: bump @halo-dev/api-client for post stats (#652)
#### What type of PR is this?

/kind api-change
/kind bug

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

更新 `@halo-dev/api-client` 以修复文章访问数据不正确的问题。

#### Special notes for your reviewer:

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

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

```release-note
更新 `@halo-dev/api-client` 以修复文章访问数据不正确的问题。
```
2022-10-20 06:30:14 +00:00
Ryan Wang 54755c5842
refactor: router and menu generation (#651)
#### What type of PR is this?

/kind api-change
/kind improvement
/milestone 2.0

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

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

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

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

定义路由的方式:

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

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

menu 字段类型:

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

插件适配需要做的改动:

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

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

todolist:

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

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

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

#### Special notes for your reviewer:

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

测试方式:

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

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

```release-note
重构路由和侧边菜单生成的逻辑。
```
2022-10-19 08:54:13 +00:00
Ryan Wang dd17087b8c
feat: add support for displaying and installing uninstalled themes (#648)
#### 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/2586

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

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

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/196148567-f43b1bf3-e745-4c1a-950d-65899c1ae73c.png">

#### Special notes for your reviewer:

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

测试方式:

1. 需要 `pnpm install`
2. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2586 PR 的分支。
3. 在本地的 `~/halo-dev/themes` 创建新的主题,需要包含 `themes.yaml`,或者将现有的主题直接下载到 `~/halo-dev/themes`
4. 检查后台主题管理的主题列表中是否显示了未安装的主题,以及测试是否可以安装成功。

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

```release-note
支持显示和安装未安装的主题,以方便主题开发的时候,创建主题资源。
```
2022-10-18 10:12:11 +00:00
Ryan Wang edef11cc12
feat: add some formkit custom input for the system core extensions (#643)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

Ref https://github.com/halo-dev/halo/issues/2526#issuecomment-1273094868

FormKit 文档:https://formkit.com/advanced/custom-inputs

通过扩展 FormKit 的自定义 Input,提供系统常用资源的选择组件。

目前提供如下类型:

- menuCheckbox
- menuRadio
- menuItemSelect
- postSelect
- categorySelect
- tagSelect
- singlePageSelect
- categoryCheckbox
- tagCheckbox

FormKit 组件的使用方式:

```vue
<FormKit
        placeholder="请选择文章"
        label="文章"
        type="postSelect"
        validation="required"
/>
```

FormKit Schema 的使用方式:

```yaml
- $formkit: menuRadio
    name: menus
    label: 底部菜单组
```

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

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

#### 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:

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

测试方式:

1. 检查后台文章设置弹框的选择分类和标签功能是否正常。
2. 检查后台添加菜单项的功能是否正常。
3. 使用主题或者插件定义 settings.yaml,使用上述任意 input 类型,检查得到的效果和值是否正常。

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

```release-note
通过扩展 FormKit 的自定义 Input,提供系统常用资源的选择组件。
```
2022-10-18 03:32:09 +00:00
Ryan Wang 81791cfeac
feat: add operation exception toasts for loading plugin resources and login (#645)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

为登录操作和加载插件资源添加异常提示。

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

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

#### Screenshots:

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

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

#### Special notes for your reviewer:

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

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

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

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
为登录操作和加载插件资源添加异常提示。
```
2022-10-18 03:30:10 +00:00
Ryan Wang 512ee82216
refactor: api of dialog component (#646)
#### What type of PR is this?

/kind api-change
/kind improvement
/milestone 2.0

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

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

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

#### Special notes for your reviewer:

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

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

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

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

/kind improvement
/milestone 2.0

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

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

#### Screenshots:

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

#### Special notes for your reviewer:

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

测试方式:

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

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

```release-note
优化 Avatar 组件在图片加载失败的状态
```
2022-10-17 16:45:38 +00:00
Ryan Wang 2ae2cfad00
chore: bump @halo-dev/api-client for attachment custom endpoint (#647)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

升级 `@halo-dev/api-client` 版本以适配 Attachment 资源的自定义 Endpoint。

#### 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-10-17 14:53:39 +00:00
Ryan Wang 252e3f1392
feat: add toast component (#644)
#### What type of PR is this?

/kind feature
/milestone 2.0

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

添加 Toast 组件。

特性:

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

使用方式:

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

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

props:

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

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

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

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

#### Screenshots:

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

#### Special notes for your reviewer:

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

测试方式:

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

测试功能是否正常。

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

```release-note
添加 Toast 组件
```
2022-10-17 06:09:38 +00:00
Simple-Stark 279dc59608
fix: `build:packages` script not running on Windows (#642)
#### What type of PR is this?

/kind documentation

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

修复在 Windows 平台下无法正常运行 `build:packages` 等脚本的问题。

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

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

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

```release-note
NONE
```
2022-10-14 05:50:17 +00:00
John Niang e419ddc617
Add Makefile for convenient operations (#641)
#### What type of PR is this?

/kind feature
/area console

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

```bash
╰─❯ make help 
all                  lint and test code
install              install dependencies
build                build console
lint                 lint code
test                 run tests
help                 print this help
```

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

```release-note
None
```
2022-10-13 10:00:16 +00:00
Ryan Wang 8b15196a33
refactor: set the root path of the development environment to /console (#638)
#### What type of PR is this?

/kind improvement
/milestone 2.0

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

将开发环境的访问根路径改为 `/console`,即 `http://localhost:3000/console`,方便后续 Halo 对此地址进行反向代理,保证同源。

#### Special notes for your reviewer:

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

测试方式:启动之后访问 <http://localhost:3000/console>,检查控制台是否有资源加载异常。

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

```release-note
None
```
2022-10-11 15:32:14 +00:00
Ryan Wang 170c027bfe
refactor: logic of user login (#636)
#### 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/2528

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

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

#### Special notes for your reviewer:

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

```release-note
优化用户登录的逻辑
```
2022-10-11 09:00:14 +00:00
Ryan Wang b1cc54335d perf: remove unused imports
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-11 15:35:49 +08:00
Ryan Wang abd6d90377 feat: add support for selecting parent menu item when creating menu item
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-11 15:33:51 +08:00
Ryan Wang 4c394fe752 perf: remove incorrect help text from menu form
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-11 14:26:37 +08:00
Ryan Wang ca141d7da6 feat: add deleting plugin setting and configMap support
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-10 17:04:32 +08:00
Ryan Wang 95d58fbcdb perf: optimize reset theme settings config
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-10 16:55:25 +08:00
Ryan Wang 794da0ecb6 chore: bump dependencies
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-10 15:50:18 +08:00
Ryan Wang 655fae2669 perf: refine ui permissions adapter
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-10 15:29:05 +08:00
Ryan Wang b7389529d7
chore: add pull request template and remove auto assign config file (#635)
#### What type of PR is this?

/kind documentation

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

添加 PR 模板和删除 auto assign 的配置文件。 Ref https://github.com/halo-dev/console/pull/569

#### Special notes for your reviewer:

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

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

```release-note
None
```
2022-10-09 06:58:29 +00:00
Ryan Wang e1155c35fa
refactor: rename admin to console (#634)
#### 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/2521 我们已经将 halo-admin 的命名改为了 console,所以相关命名需要同步修改。

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

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

#### Special notes for your reviewer:

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

测试方式:

1. 需要 `pnpm install && pnpm build:packages`
2. 测试后台功能是否正常。

PS:将在此 PR 合并之后发布 `@halo-dev/console-shared` 包到 npm。

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

```release-note
None
```
2022-10-09 06:56:33 +00:00
Ryan Wang d246cc1e92 chore: bump dependencies
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-10-09 13:59:35 +08:00
Ryan Wang 7bc46a5e90
fix: ui permissions (#633) 2022-09-30 19:03:38 +08:00
Ryan Wang d385ae84dd
docs: update readme for Halo 2.0 (#630)
#### What type of PR is this?

/kind documentation
/milestone 2.0

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

更新 README

#### Special notes for your reviewer:

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

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


```release-note
None
```
2022-09-30 09:58:18 +00:00
Ryan Wang 3ae432ac75
feat: refine ui permissions (#628)
#### What type of PR is this?

/kind feature
/kind improvement
/milestone 2.0

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

完善 UI 权限控制。适配 https://github.com/halo-dev/halo/pull/2488

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

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

#### Special notes for your reviewer:

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

测试方式:

1. Halo 需要使用 https://github.com/halo-dev/halo/issues/2342 PR 的分支。
2. 创建新的角色,并勾选需要测试的权限。
3. 创建新的用户并赋予新的角色。
4. 测试操作权限。


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

```release-note
完善 UI 权限控制
```
2022-09-30 09:48:19 +00:00
Ryan Wang a6e913abc5
feat: add system setup support (#632)
#### 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/2428

#### Special notes for your reviewer:

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

测试方式:

1. 清空数据库。
2. 启动之后登录即可跳转到初始化界面。
3. 测试初始化的功能是否正常。

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

```release-note
None
```
2022-09-30 09:46:19 +00:00
Ryan Wang c09ac47537 Merge remote-tracking branch 'origin/next' into next 2022-09-30 16:39:39 +08:00
Ryan Wang 7e08350da5 fix: failed to load side menus
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-30 16:38:13 +08:00
Ryan Wang e13b4977bd perf: hide upload cover button of user detail page
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-30 16:36:35 +08:00
Ryan Wang e98f3e19ad
feat: support for displaying site content statistics (#624)
#### 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/2476

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

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

#### Special notes for your reviewer:

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

测试方式:

1. Halo 需要 https://github.com/halo-dev/halo/pull/2476 PR 中的分支。
2. 需要执行 `pnpm install && pnpm build:packages`
3. 随机访问前台文章或者自定义页面,以及添加评论。
4. 查看后台是否正确统计文章浏览数和评论数。

TODO list:

- [ ] 更新 `@halo-dev/api-client`

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

```release-note
支持在文章和自定义页面的管理列表显示访问数和评论数
```
2022-09-30 08:06:18 +00:00
Ryan Wang bdd8632647 perf: improve attachment upload modal
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-30 13:03:31 +08:00
Ryan Wang bd1472251f
feat: add plugin filters support (#629)
#### What type of PR is this?

/kind feature
/kind improvement
/milestone 2.0

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

添加插件管理筛选的支持。适配 https://github.com/halo-dev/halo/pull/2489

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

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

#### Special notes for your reviewer:

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

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2489 PR 的分支。
2. Console 需要 `pnpm install`
3. 安装若干插件,测试筛选和排序。

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

```release-note
插件管理支持筛选
```
2022-09-30 03:12:18 +00:00
Ryan Wang 13b4094468 fix: typo of allowComment label
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-29 22:43:57 +08:00
Ryan Wang 36f268cfbc fix: failed to create menu item with ref
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-29 22:39:56 +08:00
Ryan Wang 3edc16a744 perf: improve post tag styles
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-29 14:16:11 +08:00
Ryan Wang 05a6c1cec9 perf: refine validation config of user editing form
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-29 14:06:19 +08:00
Ryan Wang 668c678714 refactor: pagination component
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-29 12:47:03 +08:00