From bade95b2c540ccfed91ba32912bc19c7db8c9c04 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Thu, 11 Dec 2025 18:12:57 +0900 Subject: [PATCH] [backport cloud/1.34] feat: replace Stripe pricing table with custom implementation (#7361) Backport of #7359 to `cloud/1.34` Automatically created by backport workflow. Co-authored-by: Christian Byrne Co-authored-by: Claude --- src/config/stripePricingTableConfig.ts | 34 --- src/locales/en/main.json | 34 ++- .../subscription/components/PricingTable.vue | 273 ++++++++++++++++++ .../components/StripePricingTable.vue | 117 -------- .../SubscriptionRequiredDialogContent.vue | 50 ++-- .../useStripePricingTableLoader.ts | 118 -------- .../composables/useSubscription.ts | 1 + .../components/StripePricingTable.test.ts | 113 -------- 8 files changed, 330 insertions(+), 410 deletions(-) delete mode 100644 src/config/stripePricingTableConfig.ts create mode 100644 src/platform/cloud/subscription/components/PricingTable.vue delete mode 100644 src/platform/cloud/subscription/components/StripePricingTable.vue delete mode 100644 src/platform/cloud/subscription/composables/useStripePricingTableLoader.ts delete mode 100644 tests-ui/tests/platform/cloud/subscription/components/StripePricingTable.test.ts diff --git a/src/config/stripePricingTableConfig.ts b/src/config/stripePricingTableConfig.ts deleted file mode 100644 index 6c1f0e0cf..000000000 --- a/src/config/stripePricingTableConfig.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { remoteConfig } from '@/platform/remoteConfig/remoteConfig' - -export const STRIPE_PRICING_TABLE_SCRIPT_SRC = - 'https://js.stripe.com/v3/pricing-table.js' - -interface StripePricingTableConfig { - publishableKey: string - pricingTableId: string -} - -function getEnvValue( - key: 'VITE_STRIPE_PUBLISHABLE_KEY' | 'VITE_STRIPE_PRICING_TABLE_ID' -) { - return import.meta.env[key] -} - -export function getStripePricingTableConfig(): StripePricingTableConfig { - const publishableKey = - remoteConfig.value.stripe_publishable_key || - window.__CONFIG__?.stripe_publishable_key || - getEnvValue('VITE_STRIPE_PUBLISHABLE_KEY') || - '' - - const pricingTableId = - remoteConfig.value.stripe_pricing_table_id || - window.__CONFIG__?.stripe_pricing_table_id || - getEnvValue('VITE_STRIPE_PRICING_TABLE_ID') || - '' - - return { - publishableKey, - pricingTableId - } -} diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 535f25c3d..7c8624475 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -1870,6 +1870,7 @@ "comfyCloudLogo": "Comfy Cloud Logo", "beta": "BETA", "perMonth": "/ month", + "usdPerMonth": "USD / month", "renewsDate": "Renews {date}", "refreshesOn": "Refreshes to ${monthlyCreditBonusUsd} on {date}", "expiresDate": "Expires {date}", @@ -1922,7 +1923,8 @@ "maxDurationLabel": "max duration of each workflow run", "gpuLabel": "RTX 6000 Pro (96GB VRAM)", "addCreditsLabel": "Add more credits whenever", - "customLoRAsLabel": "Import your own LoRAs" + "customLoRAsLabel": "Import your own LoRAs", + "videoEstimate": "120" } }, "creator": { @@ -1935,7 +1937,8 @@ "maxDurationLabel": "max duration of each workflow run", "gpuLabel": "RTX 6000 Pro (96GB VRAM)", "addCreditsLabel": "Add more credits whenever", - "customLoRAsLabel": "Import your own LoRAs" + "customLoRAsLabel": "Import your own LoRAs", + "videoEstimate": "288" } }, "pro": { @@ -1948,7 +1951,8 @@ "maxDurationLabel": "max duration of each workflow run", "gpuLabel": "RTX 6000 Pro (96GB VRAM)", "addCreditsLabel": "Add more credits whenever", - "customLoRAsLabel": "Import your own LoRAs" + "customLoRAsLabel": "Import your own LoRAs", + "videoEstimate": "815" } } }, @@ -1971,7 +1975,29 @@ "haveQuestions": "Have questions or wondering about enterprise?", "contactUs": "Contact us", "viewEnterprise": "view enterprise", - "partnerNodesCredits": "Partner nodes pricing" + "partnerNodesCredits": "Partner nodes pricing", + "mostPopular": "Most popular", + "currentPlan": "Current Plan", + "subscribeTo": "Subscribe to {plan}", + "monthlyCreditsLabel": "Monthly credits", + "maxDurationLabel": "Max duration of each workflow run", + "gpuLabel": "RTX 6000 Pro (96GB VRAM)", + "addCreditsLabel": "Add more credits whenever", + "customLoRAsLabel": "Import your own LoRAs", + "videoEstimateLabel": "Approx. amount of 5s videos generated with Wan Fun Control template", + "videoEstimateHelp": "What is this?", + "upgradeTo": "Upgrade to {plan}", + "changeTo": "Change to {plan}", + "credits": { + "standard": "4,200", + "creator": "7,400", + "pro": "21,100" + }, + "maxDuration": { + "standard": "30 min", + "creator": "30 min", + "pro": "1 hr" + } }, "userSettings": { "title": "My Account Settings", diff --git a/src/platform/cloud/subscription/components/PricingTable.vue b/src/platform/cloud/subscription/components/PricingTable.vue new file mode 100644 index 000000000..73b7d879e --- /dev/null +++ b/src/platform/cloud/subscription/components/PricingTable.vue @@ -0,0 +1,273 @@ + + + \ No newline at end of file diff --git a/src/platform/cloud/subscription/components/StripePricingTable.vue b/src/platform/cloud/subscription/components/StripePricingTable.vue deleted file mode 100644 index 8efa7c21e..000000000 --- a/src/platform/cloud/subscription/components/StripePricingTable.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - diff --git a/src/platform/cloud/subscription/components/SubscriptionRequiredDialogContent.vue b/src/platform/cloud/subscription/components/SubscriptionRequiredDialogContent.vue index ddb1680d8..43e6a2295 100644 --- a/src/platform/cloud/subscription/components/SubscriptionRequiredDialogContent.vue +++ b/src/platform/cloud/subscription/components/SubscriptionRequiredDialogContent.vue @@ -1,6 +1,6 @@