Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat(billing): add tax information tooltips in pricing footer (#26705)

Coding On Star3a5aa4587c45
diff --git a/web/app/components/billing/pricing/footer.tsx b/web/app/components/billing/pricing/footer.tsx
index 4e3cdfee3d2..fd713eb3da9 100644
--- a/web/app/components/billing/pricing/footer.tsx
+++ b/web/app/components/billing/pricing/footer.tsx
@@ -2,19 +2,29 @@ import React from 'react'
import Link from 'next/link'
import { useTranslation } from 'react-i18next'
import { RiArrowRightUpLine } from '@remixicon/react'
+import { type Category, CategoryEnum } from '.'
+import cn from '@/utils/classnames'
type FooterProps = {
pricingPageURL: string
+ currentCategory: Category
}
const Footer = ({
pricingPageURL,
+ currentCategory,
}: FooterProps) => {
const { t } = useTranslation()
return (
<div className='flex min-h-16 w-full justify-center border-t border-divider-accent px-10'>
- <div className='flex max-w-[1680px] grow justify-end border-x border-divider-accent p-6'>
+ <div className={cn('flex max-w-[1680px] grow border-x border-divider-accent p-6', currentCategory === CategoryEnum.CLOUD ? 'justify-between' : 'justify-end') }>
+ {currentCategory === CategoryEnum.CLOUD && (
+ <div className='flex flex-col text-text-tertiary'>
+ <span className='system-xs-regular'>{t('billing.plansCommon.taxTip')}</span>
+ <span className='system-xs-regular'>{t('billing.plansCommon.taxTipSecond')}</span>
+ </div>
+ )}
<span className='flex h-fit items-center gap-x-1 text-saas-dify-blue-accessible'>
<Link
href={pricingPageURL}
diff --git a/web/app/components/billing/pricing/index.tsx b/web/app/components/billing/pricing/index.tsx
index 98072ec7c5c..8b678ab2721 100644
--- a/web/app/components/billing/pricing/index.tsx
+++ b/web/app/components/billing/pricing/index.tsx
@@ -13,7 +13,12 @@ import { useAppContext } from '@/context/app-context'
import { useGetPricingPageLanguage } from '@/context/i18n'
import { NoiseBottom, NoiseTop } from './assets'
-export type Category = 'cloud' | 'self'
+export enum CategoryEnum {
+ CLOUD = 'cloud',
+ SELF = 'self',
+}
+
+export type Category = CategoryEnum.CLOUD | CategoryEnum.SELF
type PricingProps = {
onCancel: () => void
@@ -25,7 +30,7 @@ const Pricing: FC<PricingProps> = ({
const { plan } = useProviderContext()
const { isCurrentWorkspaceManager } = useAppContext()
const [planRange, setPlanRange] = React.useState<PlanRange>(PlanRange.monthly)
- const [currentCategory, setCurrentCategory] = useState<Category>('cloud')
+ const [currentCategory, setCurrentCategory] = useState<Category>(CategoryEnum.CLOUD)
const canPay = isCurrentWorkspaceManager
useKeyPress(['esc'], onCancel)
@@ -57,7 +62,7 @@ const Pricing: FC<PricingProps> = ({
planRange={planRange}
canPay={canPay}
/>
- <Footer pricingPageURL={pricingPageURL} />
+ <Footer pricingPageURL={pricingPageURL} currentCategory={currentCategory}/>
<div className='absolute -bottom-12 left-0 right-0 -z-10'>
<NoiseBottom />
</div>
diff --git a/web/i18n/en-US/billing.ts b/web/i18n/en-US/billing.ts
index 72cf9a3fcae..91696312815 100644
--- a/web/i18n/en-US/billing.ts
+++ b/web/i18n/en-US/billing.ts
@@ -37,6 +37,8 @@ const translation = {
save: 'Save ',
free: 'Free',
annualBilling: 'Bill Annually Save {{percent}}%',
+ taxTip: 'All subscription prices (monthly/annual) exclude applicable taxes (e.g., VAT, sales tax).',
+ taxTipSecond: 'If your region has no applicable tax requirements, no tax will appear in your checkout, and you won’t be charged any additional fees for the entire subscription term.',
comparePlanAndFeatures: 'Compare plans & features',
priceTip: 'per workspace/',
currentPlan: 'Current Plan',
diff --git a/web/i18n/ja-JP/billing.ts b/web/i18n/ja-JP/billing.ts
index 426687da6c0..6dbff60d5a9 100644
--- a/web/i18n/ja-JP/billing.ts
+++ b/web/i18n/ja-JP/billing.ts
@@ -36,6 +36,8 @@ const translation = {
save: '節約 ',
free: '無料',
annualBilling: '年次請求',
+ taxTip: 'すべてのサブスクリプション料金(月額/年額)は、適用される税金(例:消費税、付加価値税)を含みません。',
+ taxTipSecond: 'お客様の地域に適用税がない場合、チェックアウト時に税金は表示されず、サブスクリプション期間中に追加料金が請求されることもありません。',
comparePlanAndFeatures: 'プランと機能を比較する',
priceTip: 'ワークスペース/',
currentPlan: '現在のプラン',
diff --git a/web/i18n/zh-Hans/billing.ts b/web/i18n/zh-Hans/billing.ts
index 96ba7970c80..00a7dd909ab 100644
--- a/web/i18n/zh-Hans/billing.ts
+++ b/web/i18n/zh-Hans/billing.ts
@@ -36,6 +36,8 @@ const translation = {
save: '节省',
free: '免费',
annualBilling: '按年计费节省 {{percent}}%',
+ taxTip: '所有订阅价格(按月/按年)均不含适用税费(如增值税、销售税)。',
+ taxTipSecond: '如果您所在地区无适用税费要求,结账时将不会显示税费,且在整个订阅周期内您都无需支付任何额外费用。',
comparePlanAndFeatures: '对比套餐 & 功能特性',
priceTip: '每个团队空间/',
currentPlan: '当前计划',