From 1ca60adfdb596b24614f7cd906e32c13496569d7 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Fri, 19 Dec 2025 11:21:11 +0900 Subject: [PATCH] [backport cloud/1.35] fix: pricing table links to wrong page in docs (p2) (#7609) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #7434 to `cloud/1.35` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7609-backport-cloud-1-35-fix-pricing-table-links-to-wrong-page-in-docs-p2-2cd6d73d36508139993edeb721f0ecfa) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne --- .../dialog/content/setting/LegacyCreditsPanel.vue | 6 ++---- src/components/topbar/CurrentUserPopover.test.ts | 5 ++++- src/components/topbar/CurrentUserPopover.vue | 6 ++---- src/composables/useExternalLink.ts | 8 +++++++- .../cloud/subscription/components/SubscriptionPanel.vue | 6 ++---- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/components/dialog/content/setting/LegacyCreditsPanel.vue b/src/components/dialog/content/setting/LegacyCreditsPanel.vue index e5bddcaa6..9055f3972 100644 --- a/src/components/dialog/content/setting/LegacyCreditsPanel.vue +++ b/src/components/dialog/content/setting/LegacyCreditsPanel.vue @@ -139,7 +139,7 @@ interface CreditHistoryItemData { isPositive: boolean } -const { buildDocsUrl } = useExternalLink() +const { buildDocsUrl, docsPaths } = useExternalLink() const dialogService = useDialogService() const authStore = useFirebaseAuthStore() const authActions = useFirebaseAuthActions() @@ -194,9 +194,7 @@ const handleFaqClick = () => { const handleOpenPartnerNodesInfo = () => { window.open( - buildDocsUrl('/tutorials/api-nodes/overview#api-nodes', { - includeLocale: true - }), + buildDocsUrl(docsPaths.partnerNodesPricing, { includeLocale: true }), '_blank' ) } diff --git a/src/components/topbar/CurrentUserPopover.test.ts b/src/components/topbar/CurrentUserPopover.test.ts index f46ae0990..cb2efd7b7 100644 --- a/src/components/topbar/CurrentUserPopover.test.ts +++ b/src/components/topbar/CurrentUserPopover.test.ts @@ -131,7 +131,10 @@ vi.mock('@/base/credits/comfyCredits', () => ({ // Mock useExternalLink vi.mock('@/composables/useExternalLink', () => ({ useExternalLink: vi.fn(() => ({ - buildDocsUrl: vi.fn((path) => `https://docs.comfy.org${path}`) + buildDocsUrl: vi.fn((path) => `https://docs.comfy.org${path}`), + docsPaths: { + partnerNodesPricing: '/tutorials/partner-nodes/pricing' + } })) })) diff --git a/src/components/topbar/CurrentUserPopover.vue b/src/components/topbar/CurrentUserPopover.vue index e2630c5be..af1a3ed08 100644 --- a/src/components/topbar/CurrentUserPopover.vue +++ b/src/components/topbar/CurrentUserPopover.vue @@ -160,7 +160,7 @@ const emit = defineEmits<{ close: [] }>() -const { buildDocsUrl } = useExternalLink() +const { buildDocsUrl, docsPaths } = useExternalLink() const { userDisplayName, userEmail, userPhotoUrl, handleSignOut } = useCurrentUser() @@ -224,9 +224,7 @@ const handleTopUp = () => { const handleOpenPartnerNodesInfo = () => { window.open( - buildDocsUrl('/tutorials/partner-nodes/pricing', { - includeLocale: true - }), + buildDocsUrl(docsPaths.partnerNodesPricing, { includeLocale: true }), '_blank' ) emit('close') diff --git a/src/composables/useExternalLink.ts b/src/composables/useExternalLink.ts index 2758e2ced..75cb07454 100644 --- a/src/composables/useExternalLink.ts +++ b/src/composables/useExternalLink.ts @@ -92,8 +92,14 @@ export function useExternalLink() { comfyOrg: 'https://www.comfy.org/' } + /** Common doc paths for use with buildDocsUrl */ + const docsPaths = { + partnerNodesPricing: '/tutorials/partner-nodes/pricing' + } + return { buildDocsUrl, - staticUrls + staticUrls, + docsPaths } } diff --git a/src/platform/cloud/subscription/components/SubscriptionPanel.vue b/src/platform/cloud/subscription/components/SubscriptionPanel.vue index 49fbb103c..60032de8b 100644 --- a/src/platform/cloud/subscription/components/SubscriptionPanel.vue +++ b/src/platform/cloud/subscription/components/SubscriptionPanel.vue @@ -378,7 +378,7 @@ type TierKey = (typeof TIER_TO_I18N_KEY)[SubscriptionTier] const DEFAULT_TIER_KEY: TierKey = 'standard' -const { buildDocsUrl } = useExternalLink() +const { buildDocsUrl, docsPaths } = useExternalLink() const authActions = useFirebaseAuthActions() const { t } = useI18n() @@ -469,9 +469,7 @@ const { const handleOpenPartnerNodesInfo = () => { window.open( - buildDocsUrl('/tutorials/api-nodes/overview#api-nodes', { - includeLocale: true - }), + buildDocsUrl(docsPaths.partnerNodesPricing, { includeLocale: true }), '_blank' ) }