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
```
pull/3445/head
Ryan Wang 2022-11-28 10:50:17 +08:00 committed by GitHub
parent ff236810d9
commit c21b0fdfe8
4 changed files with 12 additions and 12 deletions

View File

@ -32,7 +32,7 @@
"@formkit/themes": "^1.0.0-beta.12", "@formkit/themes": "^1.0.0-beta.12",
"@formkit/utils": "^1.0.0-beta.12", "@formkit/utils": "^1.0.0-beta.12",
"@formkit/vue": "^1.0.0-beta.12", "@formkit/vue": "^1.0.0-beta.12",
"@halo-dev/api-client": "^0.0.51", "@halo-dev/api-client": "^0.0.53",
"@halo-dev/components": "workspace:*", "@halo-dev/components": "workspace:*",
"@halo-dev/console-shared": "workspace:*", "@halo-dev/console-shared": "workspace:*",
"@halo-dev/richtext-editor": "^0.0.0-alpha.14", "@halo-dev/richtext-editor": "^0.0.0-alpha.14",

View File

@ -12,7 +12,7 @@ importers:
'@formkit/themes': ^1.0.0-beta.12 '@formkit/themes': ^1.0.0-beta.12
'@formkit/utils': ^1.0.0-beta.12 '@formkit/utils': ^1.0.0-beta.12
'@formkit/vue': ^1.0.0-beta.12 '@formkit/vue': ^1.0.0-beta.12
'@halo-dev/api-client': ^0.0.51 '@halo-dev/api-client': ^0.0.53
'@halo-dev/components': workspace:* '@halo-dev/components': workspace:*
'@halo-dev/console-shared': workspace:* '@halo-dev/console-shared': workspace:*
'@halo-dev/richtext-editor': ^0.0.0-alpha.14 '@halo-dev/richtext-editor': ^0.0.0-alpha.14
@ -104,7 +104,7 @@ importers:
'@formkit/themes': 1.0.0-beta.12-e579559_tailwindcss@3.2.4 '@formkit/themes': 1.0.0-beta.12-e579559_tailwindcss@3.2.4
'@formkit/utils': 1.0.0-beta.12-e579559 '@formkit/utils': 1.0.0-beta.12-e579559
'@formkit/vue': 1.0.0-beta.12-e579559_ior6jr3fpijijuwpr34w2i25va '@formkit/vue': 1.0.0-beta.12-e579559_ior6jr3fpijijuwpr34w2i25va
'@halo-dev/api-client': 0.0.51 '@halo-dev/api-client': 0.0.53
'@halo-dev/components': link:packages/components '@halo-dev/components': link:packages/components
'@halo-dev/console-shared': link:packages/shared '@halo-dev/console-shared': link:packages/shared
'@halo-dev/richtext-editor': 0.0.0-alpha.14_vue@3.2.45 '@halo-dev/richtext-editor': 0.0.0-alpha.14_vue@3.2.45
@ -1962,8 +1962,8 @@ packages:
- windicss - windicss
dev: false dev: false
/@halo-dev/api-client/0.0.51: /@halo-dev/api-client/0.0.53:
resolution: {integrity: sha512-kvwhTogmVVLNwfbAVSNUC+pYt7YXn+eaOD0/5N11BmJ+2pHQUSUKjtPwOF+U+KkQ8hRGmFxHD2XvnrcCOr4XHQ==} resolution: {integrity: sha512-B3njjXFqTi28FfDhZ9VAVlv6mMQxLgIsBUqTPmMQF/IxWWtfN6cxYi7is+zmw+chFFe38UVaEAPSHORLMxnJ6A==}
dev: false dev: false
/@halo-dev/richtext-editor/0.0.0-alpha.14_vue@3.2.45: /@halo-dev/richtext-editor/0.0.0-alpha.14_vue@3.2.45:

View File

@ -25,17 +25,17 @@ const selectedTheme = inject<Ref<Theme | undefined>>("selectedTheme");
const isActivated = inject<ComputedRef<boolean>>("isActivated"); const isActivated = inject<ComputedRef<boolean>>("isActivated");
const upgradeModal = ref(false); const upgradeModal = ref(false);
const handleReloadThemeSetting = async () => { const handleReloadTheme = async () => {
Dialog.warning({ Dialog.warning({
title: "是否确认刷新主题的设置表单", title: "是否确认重载主题的所有配置",
description: "此操作仅会刷新主题的设置表单,不会删除已有的配置。", description: "此操作仅会重载主题配置和设置表单定义,不会删除已保存的配置。",
onConfirm: async () => { onConfirm: async () => {
try { try {
if (!selectedTheme?.value) { if (!selectedTheme?.value) {
return; return;
} }
await apiClient.theme.reloadThemeSetting({ await apiClient.theme.reload({
name: selectedTheme.value.metadata.name as string, name: selectedTheme.value.metadata.name as string,
}); });
@ -101,9 +101,9 @@ const onUpgradeModalClose = () => {
v-close-popper v-close-popper
block block
type="default" type="default"
@click="handleReloadThemeSetting" @click="handleReloadTheme"
> >
刷新设置表单 重载主题配置
</VButton> </VButton>
</VSpace> </VSpace>
</div> </div>

View File

@ -155,7 +155,7 @@ const handleCreateTheme = async (theme: Theme) => {
}); });
// create theme settings // create theme settings
apiClient.theme.reloadThemeSetting({ name: data.metadata.name }); apiClient.theme.reload({ name: data.metadata.name });
activeTab.value = "installed"; activeTab.value = "installed";
} catch (error) { } catch (error) {