mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 16:59:45 +00:00
## Summary Align stale in-app pricing strings and links with the current comfy.org/cloud/pricing page. ## Changes - **What**: Update video estimate numbers (standard 120→380, creator 211→670, pro 600→1915), fix template URL (`video_wan2_2_14B_fun_camera` → `video_wan2_2_14B_i2v`), fix `templateNote` to reference Wan 2.2 Image-to-Video, align `videoEstimateExplanation` wording order with website, remove stale "$10" from `benefit1` string. ## Review Focus Copy-only changes across 4 files — no logic or UI changes. Source of truth: https://www.comfy.org/cloud/pricing ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8725-fix-align-in-app-pricing-copy-with-comfy-org-cloud-pricing-3006d73d3650811faf11c248e6bf27c3) by [Unito](https://www.unito.io)
65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
import type { components } from '@/types/comfyRegistryTypes'
|
|
|
|
type SubscriptionTier = components['schemas']['SubscriptionTier']
|
|
|
|
export type TierKey = 'standard' | 'creator' | 'pro' | 'founder'
|
|
|
|
export const TIER_TO_KEY: Record<SubscriptionTier, TierKey> = {
|
|
STANDARD: 'standard',
|
|
CREATOR: 'creator',
|
|
PRO: 'pro',
|
|
FOUNDERS_EDITION: 'founder'
|
|
}
|
|
|
|
export const KEY_TO_TIER: Record<TierKey, SubscriptionTier> = {
|
|
standard: 'STANDARD',
|
|
creator: 'CREATOR',
|
|
pro: 'PRO',
|
|
founder: 'FOUNDERS_EDITION'
|
|
}
|
|
|
|
export interface TierPricing {
|
|
monthly: number
|
|
yearly: number
|
|
credits: number
|
|
videoEstimate: number
|
|
}
|
|
|
|
export const TIER_PRICING: Record<Exclude<TierKey, 'founder'>, TierPricing> = {
|
|
standard: { monthly: 20, yearly: 16, credits: 4200, videoEstimate: 380 },
|
|
creator: { monthly: 35, yearly: 28, credits: 7400, videoEstimate: 670 },
|
|
pro: { monthly: 100, yearly: 80, credits: 21100, videoEstimate: 1915 }
|
|
}
|
|
|
|
interface TierFeatures {
|
|
customLoRAs: boolean
|
|
maxMembers: number
|
|
}
|
|
|
|
const TIER_FEATURES: Record<TierKey, TierFeatures> = {
|
|
standard: { customLoRAs: false, maxMembers: 1 },
|
|
creator: { customLoRAs: true, maxMembers: 5 },
|
|
pro: { customLoRAs: true, maxMembers: 20 },
|
|
founder: { customLoRAs: false, maxMembers: 1 }
|
|
}
|
|
|
|
export const DEFAULT_TIER_KEY: TierKey = 'standard'
|
|
|
|
const FOUNDER_MONTHLY_PRICE = 20
|
|
const FOUNDER_MONTHLY_CREDITS = 5460
|
|
|
|
export function getTierPrice(tierKey: TierKey, isYearly = false): number {
|
|
if (tierKey === 'founder') return FOUNDER_MONTHLY_PRICE
|
|
const pricing = TIER_PRICING[tierKey]
|
|
return isYearly ? pricing.yearly : pricing.monthly
|
|
}
|
|
|
|
export function getTierCredits(tierKey: TierKey): number {
|
|
if (tierKey === 'founder') return FOUNDER_MONTHLY_CREDITS
|
|
return TIER_PRICING[tierKey].credits
|
|
}
|
|
|
|
export function getTierFeatures(tierKey: TierKey): TierFeatures {
|
|
return TIER_FEATURES[tierKey]
|
|
}
|