mirror of https://github.com/halo-dev/halo
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
parent
ff236810d9
commit
c21b0fdfe8
|
@ -32,7 +32,7 @@
|
|||
"@formkit/themes": "^1.0.0-beta.12",
|
||||
"@formkit/utils": "^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/console-shared": "workspace:*",
|
||||
"@halo-dev/richtext-editor": "^0.0.0-alpha.14",
|
||||
|
|
|
@ -12,7 +12,7 @@ importers:
|
|||
'@formkit/themes': ^1.0.0-beta.12
|
||||
'@formkit/utils': ^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/console-shared': workspace:*
|
||||
'@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/utils': 1.0.0-beta.12-e579559
|
||||
'@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/console-shared': link:packages/shared
|
||||
'@halo-dev/richtext-editor': 0.0.0-alpha.14_vue@3.2.45
|
||||
|
@ -1962,8 +1962,8 @@ packages:
|
|||
- windicss
|
||||
dev: false
|
||||
|
||||
/@halo-dev/api-client/0.0.51:
|
||||
resolution: {integrity: sha512-kvwhTogmVVLNwfbAVSNUC+pYt7YXn+eaOD0/5N11BmJ+2pHQUSUKjtPwOF+U+KkQ8hRGmFxHD2XvnrcCOr4XHQ==}
|
||||
/@halo-dev/api-client/0.0.53:
|
||||
resolution: {integrity: sha512-B3njjXFqTi28FfDhZ9VAVlv6mMQxLgIsBUqTPmMQF/IxWWtfN6cxYi7is+zmw+chFFe38UVaEAPSHORLMxnJ6A==}
|
||||
dev: false
|
||||
|
||||
/@halo-dev/richtext-editor/0.0.0-alpha.14_vue@3.2.45:
|
||||
|
|
|
@ -25,17 +25,17 @@ const selectedTheme = inject<Ref<Theme | undefined>>("selectedTheme");
|
|||
const isActivated = inject<ComputedRef<boolean>>("isActivated");
|
||||
const upgradeModal = ref(false);
|
||||
|
||||
const handleReloadThemeSetting = async () => {
|
||||
const handleReloadTheme = async () => {
|
||||
Dialog.warning({
|
||||
title: "是否确认刷新主题的设置表单?",
|
||||
description: "此操作仅会刷新主题的设置表单,不会删除已有的配置。",
|
||||
title: "是否确认重载主题的所有配置?",
|
||||
description: "此操作仅会重载主题配置和设置表单定义,不会删除已保存的配置。",
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
if (!selectedTheme?.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
await apiClient.theme.reloadThemeSetting({
|
||||
await apiClient.theme.reload({
|
||||
name: selectedTheme.value.metadata.name as string,
|
||||
});
|
||||
|
||||
|
@ -101,9 +101,9 @@ const onUpgradeModalClose = () => {
|
|||
v-close-popper
|
||||
block
|
||||
type="default"
|
||||
@click="handleReloadThemeSetting"
|
||||
@click="handleReloadTheme"
|
||||
>
|
||||
刷新设置表单
|
||||
重载主题配置
|
||||
</VButton>
|
||||
</VSpace>
|
||||
</div>
|
||||
|
|
|
@ -155,7 +155,7 @@ const handleCreateTheme = async (theme: Theme) => {
|
|||
});
|
||||
|
||||
// create theme settings
|
||||
apiClient.theme.reloadThemeSetting({ name: data.metadata.name });
|
||||
apiClient.theme.reload({ name: data.metadata.name });
|
||||
|
||||
activeTab.value = "installed";
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in New Issue