mirror of
https://github.com/vas3k/TaxHacker.git
synced 2026-07-03 10:52:28 +08:00
feat: enable saas subscription
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { PricingCard } from "@/components/auth/pricing-card"
|
||||
import { Card, CardContent, CardTitle } from "@/components/ui/card"
|
||||
import { ColoredText } from "@/components/ui/colored-text"
|
||||
import config from "@/lib/config"
|
||||
import { PLANS } from "@/lib/stripe"
|
||||
import { Mail } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { redirect } from "next/navigation"
|
||||
@@ -15,12 +17,39 @@ export default async function ChoosePlanPage() {
|
||||
<Card className="w-full max-w-4xl mx-auto p-8 flex flex-col items-center justify-center gap-8">
|
||||
<CardTitle className="text-4xl font-bold text-center">
|
||||
<ColoredText>TaxHacker Cloud Edition</ColoredText>
|
||||
<h2 className="mt-3 text-2xl font-semibold text-muted-foreground">Cloud plans are not available yet</h2>
|
||||
<h2 className="mt-3 text-2xl font-semibold text-muted-foreground">Choose your plan</h2>
|
||||
</CardTitle>
|
||||
<CardContent className="p-0 w-full">
|
||||
<div className="text-center text-md text-muted-foreground">
|
||||
Cloud plans are not available yet. Please use the self-hosted version or reach out for questions.
|
||||
</div>
|
||||
{config.auth.disableSignup ? (
|
||||
<div className="text-center text-md text-muted-foreground">
|
||||
Creating new account is disabled for now. Please use the self-hosted version.
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-8">
|
||||
<div className="flex flex-wrap justify-center gap-8">
|
||||
{Object.values(PLANS)
|
||||
.filter((plan) => plan.isAvailable)
|
||||
.map((plan) => (
|
||||
<PricingCard key={plan.code} plan={plan} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="text-center text-muted-foreground">
|
||||
By signing up, you agree to our{" "}
|
||||
<Link href="/docs/terms" className="hover:text-primary transition-colors underline">
|
||||
Terms of Service
|
||||
</Link>
|
||||
,{" "}
|
||||
<Link href="/docs/privacy_policy" className="hover:text-primary transition-colors underline">
|
||||
Privacy Policy
|
||||
</Link>
|
||||
, and{" "}
|
||||
<Link href="/docs/ai" className="hover:text-primary transition-colors underline">
|
||||
AI Usage Disclosure
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
|
||||
<div className="text-center text-muted-foreground">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { NewsletterForm } from "@/app/landing/newsletter"
|
||||
import { ColoredText } from "@/components/ui/colored-text"
|
||||
import config from "@/lib/config"
|
||||
import Image from "next/image"
|
||||
@@ -21,12 +22,20 @@ export default function LandingPage() {
|
||||
</div>
|
||||
<ColoredText className="text-2xl font-bold">TaxHacker</ColoredText>
|
||||
</Link>
|
||||
<Link
|
||||
href="/enter"
|
||||
className="cursor-pointer font-medium px-4 py-2 rounded-full border-2 border-gradient-to-r from-pink-300 to-indigo-300 hover:from-pink-400 hover:to-indigo-400 bg-white/80 hover:bg-white transition-all duration-300 hover:scale-105 text-xs md:text-sm"
|
||||
>
|
||||
Log In
|
||||
</Link>
|
||||
<div className="flex gap-1 md:gap-4 text-xs md:text-sm">
|
||||
<Link
|
||||
href="/enter"
|
||||
className="cursor-pointer font-medium px-4 py-2 rounded-full border-2 border-gradient-to-r from-pink-300 to-indigo-300 hover:from-pink-400 hover:to-indigo-400 bg-white/80 hover:bg-white transition-all duration-300 hover:scale-105"
|
||||
>
|
||||
Log In
|
||||
</Link>
|
||||
<Link
|
||||
href="/cloud"
|
||||
className="cursor-pointer font-medium bg-gradient-to-r from-pink-600 to-indigo-600 text-white px-4 py-2 rounded-full hover:from-pink-700 hover:to-indigo-700 transition-all duration-300 hover:scale-105 shadow-lg hover:shadow-xl"
|
||||
>
|
||||
Sign Up
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -383,13 +392,12 @@ export default function LandingPage() {
|
||||
Automatic updates and new features
|
||||
</li>
|
||||
</ul>
|
||||
<button
|
||||
type="button"
|
||||
disabled
|
||||
className="block w-full text-center px-6 py-4 bg-gradient-to-r from-gray-300 to-gray-400 text-gray-700 font-bold rounded-full shadow-xl opacity-80 cursor-not-allowed"
|
||||
<Link
|
||||
href="/cloud"
|
||||
className="block w-full text-center px-6 py-4 bg-gradient-to-r from-pink-600 to-purple-600 text-white font-bold rounded-full hover:from-pink-700 hover:to-purple-700 transition-all duration-300 shadow-xl hover:shadow-2xl hover:scale-110"
|
||||
>
|
||||
Temporarily unavailable
|
||||
</button>
|
||||
Early Access: €10/month 💎
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -512,28 +520,8 @@ export default function LandingPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Stay Tuned / GitHub CTA */}
|
||||
<div className="bg-gradient-to-r from-purple-50 to-blue-50 p-8 rounded-2xl shadow-sm ring-1 ring-gray-100">
|
||||
<div className="max-w-2xl mx-auto text-center">
|
||||
<h3 className="text-2xl font-semibold mb-4">Stay Tuned</h3>
|
||||
<p className="text-gray-600 mb-6">
|
||||
We're working hard on making TaxHacker useful for everyone. Star and watch our GitHub repo to get
|
||||
notified about new features and releases.
|
||||
</p>
|
||||
<div className="flex flex-col gap-4 max-w-md mx-auto">
|
||||
<div className="flex flex-wrap items-center justify-center gap-4">
|
||||
<a
|
||||
href="https://github.com/vas3k/TaxHacker"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="px-6 py-3 bg-gradient-to-r from-purple-600 to-blue-600 text-white font-medium rounded-full hover:opacity-90 transition-all shadow-lg shadow-purple-500/20"
|
||||
>
|
||||
Open GitHub repo
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* Newsletter Signup */}
|
||||
<NewsletterForm />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -52,6 +52,25 @@ export const PLANS: Record<string, Plan> = {
|
||||
storage: 512 * 1024 * 1024,
|
||||
ai: 1000,
|
||||
},
|
||||
isAvailable: false,
|
||||
},
|
||||
early_monthly: {
|
||||
code: "early_monthly",
|
||||
name: "Early Adopter",
|
||||
description: "Monthly plan for our first users who can forgive us bugs and childish problems :)",
|
||||
benefits: [
|
||||
"Special price for early adopters",
|
||||
"512 Mb of storage",
|
||||
"1000 AI file analyses per month",
|
||||
"Unlimited transactions",
|
||||
"Unlimited fields, categories and projects",
|
||||
],
|
||||
price: "€10/month",
|
||||
stripePriceId: "price_1TjxlsAs8DS4NhOzicshNQjq",
|
||||
limits: {
|
||||
storage: 512 * 1024 * 1024,
|
||||
ai: 1000,
|
||||
},
|
||||
isAvailable: true,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user