mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
fix: pricing table links to wrong page in docs (p2) (#7434)
## Summary Continuation of updating pricing table link (p1 was https://github.com/Comfy-Org/ComfyUI_frontend/pull/7402). Create a constant since it's now used in multiple locations. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7434-fix-pricing-table-links-to-wrong-page-in-docs-p2-2c86d73d36508199b320d49faa6a0c73) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -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'
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}))
|
||||
}))
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user