diff --git a/web/public/pricing/background.webp b/web/app/components/billing/pricing/assets/background.webp similarity index 100% rename from web/public/pricing/background.webp rename to web/app/components/billing/pricing/assets/background.webp diff --git a/web/app/components/billing/pricing/assets/inter-variable.woff2 b/web/app/components/billing/pricing/assets/inter-variable.woff2 new file mode 100644 index 00000000000..54e2ffe681f Binary files /dev/null and b/web/app/components/billing/pricing/assets/inter-variable.woff2 differ diff --git a/web/public/pricing/logo-dark.svg b/web/app/components/billing/pricing/assets/logo-dark.svg similarity index 100% rename from web/public/pricing/logo-dark.svg rename to web/app/components/billing/pricing/assets/logo-dark.svg diff --git a/web/public/pricing/soehne-buch.woff2 b/web/app/components/billing/pricing/assets/soehne-buch.woff2 similarity index 100% rename from web/public/pricing/soehne-buch.woff2 rename to web/app/components/billing/pricing/assets/soehne-buch.woff2 diff --git a/web/public/pricing/soehne-halbfett.woff2 b/web/app/components/billing/pricing/assets/soehne-halbfett.woff2 similarity index 100% rename from web/public/pricing/soehne-halbfett.woff2 rename to web/app/components/billing/pricing/assets/soehne-halbfett.woff2 diff --git a/web/public/pricing/soehne-kraftig.woff2 b/web/app/components/billing/pricing/assets/soehne-kraftig.woff2 similarity index 100% rename from web/public/pricing/soehne-kraftig.woff2 rename to web/app/components/billing/pricing/assets/soehne-kraftig.woff2 diff --git a/web/app/components/billing/pricing/content.tsx b/web/app/components/billing/pricing/content.tsx index ecd13edfe88..3a19022bbdb 100644 --- a/web/app/components/billing/pricing/content.tsx +++ b/web/app/components/billing/pricing/content.tsx @@ -16,7 +16,7 @@ import styles from './pricing.module.css' type BillingInterval = GetBillingSubscriptionData['query']['interval'] const intervalOptionClassName = - 'relative flex min-w-0 flex-1 cursor-pointer flex-wrap items-center justify-center gap-1 rounded-full px-3 py-1 text-lg leading-6 font-medium text-(--pricing-subdued) focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-text-accent data-checked:text-(--pricing-ink) sm:min-w-[190px] sm:flex-none sm:px-6 sm:text-2xl sm:leading-[30px]' + 'relative flex min-w-0 flex-1 cursor-pointer flex-wrap items-center justify-center gap-1 rounded-full px-3 py-1 text-lg leading-6 font-medium text-(--pricing-subdued) outline-state-accent-solid focus-visible:outline-2 focus-visible:outline-offset-2 forced-colors:data-checked:underline data-checked:text-(--pricing-ink) sm:min-w-[190px] sm:flex-none sm:px-6 sm:text-2xl sm:leading-[30px]' export function PricingContent() { const { t } = useTranslation(['appApi', 'billing', 'common']) diff --git a/web/app/components/billing/pricing/header.tsx b/web/app/components/billing/pricing/header.tsx index ed30bb898a2..b83debbb6cb 100644 --- a/web/app/components/billing/pricing/header.tsx +++ b/web/app/components/billing/pricing/header.tsx @@ -1,5 +1,8 @@ +import type { CSSProperties } from 'react' import { DialogDescription, DialogTitle } from '@langgenius/dify-ui/dialog' import { useTranslation } from 'react-i18next' +import { basePath } from '@/utils/var' +import styles from './pricing.module.css' export default function Header() { const { t } = useTranslation(['billing']) @@ -11,7 +14,12 @@ export default function Header() { Cloud diff --git a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx index 28a4a10b79f..e0d14cdd8c8 100644 --- a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx +++ b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx @@ -47,9 +47,9 @@ export function CloudPlanItem({ plan, billingInterval, billing }: CloudPlanItemP const isYearly = billingInterval === 'year' const i18nPrefix = `plans.${plan}` as const const isFreePlan = plan === 'sandbox' - const isPromotedUpgrade = + const isPrimaryAction = (currentPlan === 'sandbox' && plan === 'professional') || - (currentPlan === 'professional' && plan === 'team') + ((currentPlan === 'professional' || currentPlan === 'team') && plan === 'team') const isMostPopularPlan = plan === 'professional' const planInfo = ALL_PLANS[plan] const isCurrent = plan === currentPlan @@ -179,7 +179,7 @@ export function CloudPlanItem({ plan, billingInterval, billing }: CloudPlanItemP {t(($) => $['plansCommon.currentPlan'], { ns: 'billing' })} )} {isMostPopularPlan && ( -