diff --git a/web/app/components/billing/plan/assets/index.tsx b/web/app/components/billing/plan/assets/index.tsx new file mode 100644 index 0000000000..3ad9248d34 --- /dev/null +++ b/web/app/components/billing/plan/assets/index.tsx @@ -0,0 +1,3 @@ +export { default as Sandbox } from './sandbox' +export { default as Professional } from './professional' +export { default as Team } from './team' diff --git a/web/app/components/billing/plan/assets/professional.tsx b/web/app/components/billing/plan/assets/professional.tsx new file mode 100644 index 0000000000..9803dd17bb --- /dev/null +++ b/web/app/components/billing/plan/assets/professional.tsx @@ -0,0 +1,89 @@ +const Professional = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default Professional diff --git a/web/app/components/billing/plan/assets/sandbox.tsx b/web/app/components/billing/plan/assets/sandbox.tsx new file mode 100644 index 0000000000..f98f423f72 --- /dev/null +++ b/web/app/components/billing/plan/assets/sandbox.tsx @@ -0,0 +1,91 @@ +import React from 'react' + +const Sandbox = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(Sandbox) diff --git a/web/app/components/billing/plan/assets/team.tsx b/web/app/components/billing/plan/assets/team.tsx new file mode 100644 index 0000000000..f2d2e04e1c --- /dev/null +++ b/web/app/components/billing/plan/assets/team.tsx @@ -0,0 +1,89 @@ +const Team = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default Team diff --git a/web/app/components/billing/plan/index.tsx b/web/app/components/billing/plan/index.tsx index 7badb3666f..c1fe75fa02 100644 --- a/web/app/components/billing/plan/index.tsx +++ b/web/app/components/billing/plan/index.tsx @@ -5,12 +5,10 @@ import { useTranslation } from 'react-i18next' import { useRouter } from 'next/navigation' import { RiBook2Line, - RiBox3Line, RiFileEditLine, RiGraduationCapLine, RiGroup3Line, RiGroupLine, - RiSquareLine, } from '@remixicon/react' import { Plan, SelfHostedPlan } from '../type' import VectorSpaceInfo from '../usage-info/vector-space-info' @@ -24,6 +22,7 @@ import VerifyStateModal from '@/app/education-apply/verify-state-modal' import { EDUCATION_VERIFYING_LOCALSTORAGE_ITEM } from '@/app/education-apply/constants' import { useEducationVerify } from '@/service/use-education' import { useModalContextSelector } from '@/context/modal-context' +import { Professional, Sandbox, Team } from './assets' type Props = { loc: string @@ -58,19 +57,19 @@ const PlanComp: FC = ({ }) } return ( -
+
{plan.type === Plan.sandbox && ( - + )} {plan.type === Plan.professional && ( - + )} {plan.type === Plan.team && ( - + )} {(plan.type as any) === SelfHostedPlan.enterprise && ( - + )}
@@ -83,7 +82,7 @@ const PlanComp: FC = ({
{enableEducationPlan && !isEducationAccount && ( )} diff --git a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx index 6df33c47ed..00aa2912d9 100644 --- a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx +++ b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx @@ -12,18 +12,18 @@ import List from './list' import { Azure, GoogleCloud } from '@/app/components/base/icons/src/public/billing' import { Community, Enterprise, Premium } from '../../assets' -const style = { +const STYLE_MAP = { [SelfHostedPlan.community]: { icon: , bg: '', }, [SelfHostedPlan.premium]: { icon: , - bg: '', + bg: 'bg-billing-plan-card-premium-bg opacity-10', }, [SelfHostedPlan.enterprise]: { icon: , - bg: '', + bg: 'bg-billing-plan-card-enterprise-bg opacity-10', }, } @@ -65,13 +65,11 @@ const SelfHostedPlanItem: FC = ({ }, [isCurrentWorkspaceManager, isFreePlan, isPremiumPlan, isEnterprisePlan, t]) return ( -
+
+
- {style[plan].icon} + {STYLE_MAP[plan].icon}
{t(`${i18nPrefix}.name`)}
{t(`${i18nPrefix}.description`)}
diff --git a/web/tailwind-common-config.ts b/web/tailwind-common-config.ts index 57efbea57a..131f8f52ba 100644 --- a/web/tailwind-common-config.ts +++ b/web/tailwind-common-config.ts @@ -133,6 +133,8 @@ const config = { 'pipeline-template-card-hover-bg': 'var(--color-pipeline-template-card-hover-bg)', 'pipeline-add-documents-title-bg': 'var(--color-pipeline-add-documents-title-bg)', 'billing-plan-title-bg': 'var(--color-billing-plan-title-bg)', + 'billing-plan-card-premium-bg': 'var(--color-billing-plan-card-premium-bg)', + 'billing-plan-card-enterprise-bg': 'var(--color-billing-plan-card-enterprise-bg)', }, animation: { 'spin-slow': 'spin 2s linear infinite', diff --git a/web/themes/manual-dark.css b/web/themes/manual-dark.css index 3c195c1c71..31b7cd2a70 100644 --- a/web/themes/manual-dark.css +++ b/web/themes/manual-dark.css @@ -70,4 +70,6 @@ html[data-theme="dark"] { --color-pipeline-add-documents-title-bg: linear-gradient(92deg, rgba(54, 191, 250, 1) 0%, rgba(41, 109, 255, 1) 97.78%); --color-background-gradient-bg-fill-chat-bubble-bg-3: #27314d; --color-billing-plan-title-bg: linear-gradient(95deg, #0A68FF 29.47%, #03F 105.31%); + --color-billing-plan-card-premium-bg: linear-gradient(180deg, #F90 0%, rgba(255, 153, 0, 0.00) 100%); + --color-billing-plan-card-enterprise-bg: linear-gradient(180deg, #03F 0%, rgba(0, 51, 255, 0.00) 100%); } diff --git a/web/themes/manual-light.css b/web/themes/manual-light.css index 886bf48ad4..4a80bfeab3 100644 --- a/web/themes/manual-light.css +++ b/web/themes/manual-light.css @@ -70,4 +70,6 @@ html[data-theme="light"] { --color-pipeline-add-documents-title-bg: linear-gradient(92deg, rgba(11, 165, 236, 0.95) 0%, rgba(21, 90, 239, 0.95) 97.78%); --color-background-gradient-bg-fill-chat-bubble-bg-3: #e1effe; --color-billing-plan-title-bg: linear-gradient(95deg, #03F 29.47%, #03F 105.31%); + --color-billing-plan-card-premium-bg: linear-gradient(180deg, #F90 0%, rgba(255, 153, 0, 0.00) 100%); + --color-billing-plan-card-enterprise-bg: linear-gradient(180deg, #03F 0%, rgba(0, 51, 255, 0.00) 100%); }