diff --git a/app/pricing/page.tsx b/app/pricing/page.tsx index f653543..a733491 100644 --- a/app/pricing/page.tsx +++ b/app/pricing/page.tsx @@ -102,9 +102,6 @@ function HomeModule5() { }, [plans, billingType]); const handleSubscribe = async (planName: string) => { - if (planName === "Kickoff") { - return; - } try { // 使用新的Checkout Session方案(更简单!) diff --git a/components/common/userCard.tsx b/components/common/userCard.tsx new file mode 100644 index 0000000..021e240 --- /dev/null +++ b/components/common/userCard.tsx @@ -0,0 +1,90 @@ +import React from 'react'; + +interface UserCardProps { + /** 用户计划名称 */ + plan_name?: string; + /** 子组件内容 */ + children: React.ReactNode; +} + +/** + * 用户卡片组件 + * 根据用户级别显示不同的颜色和样式 + */ +export default function UserCard({ + plan_name = "none", + children +}: UserCardProps) { + // 根据计划名称获取对应的样式 + const getCardStyles = () => { + switch (plan_name) { + case "Kickoff": + return { + outerBg: "bg-[#3d3c3d]", + glowColor: "bg-[#c0c0c0]", + glowShadow: "shadow-[0_0_50px_rgba(192,192,192,0.3)]" + }; + case "Pro": + return { + outerBg: "bg-gradient-to-br from-[#1a1a2e] via-[#16213e] to-[#0f3460]", + glowColor: "bg-[#4facfe]", + glowShadow: "shadow-[0_0_50px_rgba(79,172,254,0.4)]" + }; + case "Ultra": + return { + outerBg: "bg-gradient-to-br from-[#0a4a4a] via-[#2a1f4a] to-[#4a0a4a]", + glowColor: "bg-gradient-to-r from-[rgb(106,244,249)] to-[rgb(199,59,255)]", + glowShadow: "shadow-[0_0_50px_rgba(106,244,249,0.5)]" + }; + default: // none + return { + outerBg: "bg-[#1a1a1a]", + glowColor: "bg-[#333]", + glowShadow: "shadow-[0_0_50px_rgba(51,51,51,0.3)]" + }; + } + }; + + const styles = getCardStyles(); + + return ( +
- {currentUser.name || currentUser.username} -
- {currentUser.plan_name && - currentUser.plan_name !== "none" && ( - - {currentUser.plan_name} - - )} -- {currentUser.email} -
-+ {currentUser.email} +
++
Say your idea in a single line,and MovieFlow will bring it to life.
+
High-quality films, any style, made with MovieFlow.