diff --git a/package.json b/package.json index 99b3ab8e..eed4d577 100644 --- a/package.json +++ b/package.json @@ -61,12 +61,12 @@ "vue-router": "^4.2.4", "xmlbuilder2": "^3.1.1", "zhi-blog-api": "^1.20.1", - "zhi-common": "^1.11.5", + "zhi-common": "^1.11.6", "zhi-device": "^2.3.0", - "zhi-fetch-middleware": "^0.2.5", - "zhi-github-middleware": "^0.1.2", + "zhi-fetch-middleware": "^0.2.6", + "zhi-github-middleware": "^0.1.3", "zhi-lib-base": "^0.4.2", - "zhi-siyuan-api": "^1.29.0", - "zhi-xmlrpc-middleware": "^0.4.0" + "zhi-siyuan-api": "^1.29.1", + "zhi-xmlrpc-middleware": "^0.4.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11c58a5e..e5a8f744 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,26 +54,26 @@ dependencies: specifier: ^1.20.1 version: 1.20.1 zhi-common: - specifier: ^1.11.5 - version: 1.11.5 + specifier: ^1.11.6 + version: 1.11.6 zhi-device: specifier: ^2.3.0 version: 2.3.0 zhi-fetch-middleware: - specifier: ^0.2.5 - version: 0.2.5 + specifier: ^0.2.6 + version: 0.2.6 zhi-github-middleware: - specifier: ^0.1.2 - version: 0.1.2 + specifier: ^0.1.3 + version: 0.1.3 zhi-lib-base: specifier: ^0.4.2 version: 0.4.2 zhi-siyuan-api: - specifier: ^1.29.0 - version: 1.29.0 + specifier: ^1.29.1 + version: 1.29.1 zhi-xmlrpc-middleware: - specifier: ^0.4.0 - version: 0.4.0 + specifier: ^0.4.1 + version: 0.4.1 devDependencies: '@terwer/esbuild-config-custom': @@ -6368,8 +6368,8 @@ packages: zhi-lib-base: 0.4.2 dev: false - /zhi-common@1.11.5: - resolution: {integrity: sha512-j3W7/71axu5npROK+4Vroy5tP2SHmPPLxMT/oMQCakAQ5h04Cc4Q9KMgGXJEcGPmVsQtfy0+iAYF4cv6h6HsYg==} + /zhi-common@1.11.6: + resolution: {integrity: sha512-gkMR/t0udj+d/etou4OLZHed+PSD+DehI6fQHGy4nzDR1IhIGSbynuPwuYSOZSxrYS1Yx1w1nNCA5brugAXb6w==} dependencies: zhi-lib-base: 0.4.2 dev: false @@ -6378,20 +6378,20 @@ packages: resolution: {integrity: sha512-we04mMt4BEqeKDxoqdJQsDFYImYlcp/yaAIkpxpMGg+9tBURfNeHPHIHkFias9VbM8yuk6xjAX6B2xJjvYE/iw==} dev: false - /zhi-fetch-middleware@0.2.5: - resolution: {integrity: sha512-cLpiz4W6eFUIr0ug3elgYR1B8sF1WeBilANKIGzAjk/ALCIvDwKBumQ1WrGRBW7HrSHqcLHB5IfyFJv33QoZUw==} + /zhi-fetch-middleware@0.2.6: + resolution: {integrity: sha512-R0m0/0CMKZl9N3aGgw8IbXSEE/kKYRxOjqzLoV5GmFPd9pSv6X1cSVSr9tGNnVEw50JhiFbn1bHZVXAnHYWwmA==} dependencies: - zhi-common: 1.11.5 + zhi-common: 1.11.6 zhi-device: 2.3.0 zhi-lib-base: 0.4.2 dev: false - /zhi-github-middleware@0.1.2: - resolution: {integrity: sha512-L1ED4wl+b16xT3Zih3pcbSO4mq1sri4EhJlHtyKJFWfHd/oX8IjvE0fdUOvLrApTOuyR2zGdfAzRUrgV9xzZyA==} + /zhi-github-middleware@0.1.3: + resolution: {integrity: sha512-DsiofanlwDRayrT/jDI3HhgH1UZmrcN9AJJPK0FfDnG/etE/XAfRYgp+7jqldfTHI+UPumN1aOYwbVty9ghiWA==} dependencies: '@octokit/core': 5.0.0 js-base64: 3.7.5 - zhi-common: 1.11.5 + zhi-common: 1.11.6 zhi-lib-base: 0.4.2 dev: false @@ -6399,18 +6399,18 @@ packages: resolution: {integrity: sha512-kfKgN4hb5efUf+k5Y9028CVV1p/hsnK0NbRsxI3uwJoTlHfTBjfi6ZfrkhDn+XEnEYeWidO75sx4RdcnT7C3KA==} dev: false - /zhi-siyuan-api@1.29.0: - resolution: {integrity: sha512-7DxC3/EF1Fz4AjiaygiLmVxtQJx0aBJY0WKlYPdcu1zKvV96i3YpbHV7lgTwE9pDY/EqK6vq4oVl52/haJv0ng==} + /zhi-siyuan-api@1.29.1: + resolution: {integrity: sha512-yfK+KG3YrmZLyp4+jEtVYRKVA0Hx7uF8KVta0YozgH1wRg5+4hgJG/Sjx7dVQ5DXyPybGp3nkPV7pePwZ8XEKw==} dependencies: zhi-blog-api: 1.20.1 - zhi-common: 1.11.5 + zhi-common: 1.11.6 zhi-lib-base: 0.4.2 dev: false - /zhi-xmlrpc-middleware@0.4.0: - resolution: {integrity: sha512-YwiGlaZ1CP+Y7ZBEas2216fQ4nJuxby3rLZerJviWssAq33INUWlaYJYKfbKuudpzJhy0GA/ocb5ddBECcIcKQ==} + /zhi-xmlrpc-middleware@0.4.1: + resolution: {integrity: sha512-CIYs7ggcxULL3b3uZeFA+rOj1pjEJZhHjJrXKFpRADft+pbSAalwx6y71tjo+INAYjnHk6r7y54k0mgCoOohnA==} dependencies: - zhi-common: 1.11.5 + zhi-common: 1.11.6 zhi-device: 2.3.0 zhi-lib-base: 0.4.2 dev: false diff --git a/src/components/publish/SinglePublishSelectPlatform.vue b/src/components/publish/SinglePublishSelectPlatform.vue index 856b72ed..5ff54607 100644 --- a/src/components/publish/SinglePublishSelectPlatform.vue +++ b/src/components/publish/SinglePublishSelectPlatform.vue @@ -28,8 +28,8 @@ import { onMounted, reactive } from "vue" import { useVueI18n } from "~/src/composables/useVueI18n.ts" import { useRouter } from "vue-router" import { createAppLogger } from "~/src/utils/appLogger.ts" -import { DynamicConfig, DynamicJsonCfg } from "~/src/components/set/publish/platform/dynamicConfig.ts" -import { HtmlUtil, JsonUtil } from "zhi-common" +import { DynamicConfig, DynamicJsonCfg, getDynPostidKey } from "~/src/components/set/publish/platform/dynamicConfig.ts" +import { HtmlUtil, JsonUtil, StrUtil } from "zhi-common" import { DYNAMIC_CONFIG_KEY } from "~/src/utils/constants.ts" import { useSettingStore } from "~/src/stores/useSettingStore.ts" @@ -51,6 +51,8 @@ const { getSetting } = useSettingStore() // datas const formData = reactive({ dynamicConfigArray: [] as DynamicConfig[], + + postMeta: {} as any, }) // methods @@ -66,10 +68,18 @@ const handleSingleDoPublish = (key: string) => { router.push(query) } +const checkHasPublished = (key: string) => { + const postidKey = getDynPostidKey(key) + const postMetaValue = formData.postMeta[postidKey] + + return !StrUtil.isEmptyString(postMetaValue) +} + const initPage = async () => { const setting = await getSetting() const dynJsonCfg = JsonUtil.safeParse(setting[DYNAMIC_CONFIG_KEY], {} as DynamicJsonCfg) formData.dynamicConfigArray = dynJsonCfg?.totalCfg || [] + formData.postMeta = setting[props.id] } onMounted(async () => { @@ -86,7 +96,7 @@ onMounted(async () => { { >
- + - {{ HtmlUtil.parseHtml(cfg.platformName, 12) }} + {{ HtmlUtil.parseHtml(cfg.platformName, 11) }}
@@ -135,7 +149,7 @@ $icon_size = 32px font-weight 600 margin-bottom 12px .icon-list - text-align center + text-align left gap 10px .define-item color var(--el-color-primary)