Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: updates

Marc Seitze52b759b9ad5
diff --git a/app/api/cron/upgrade/route.ts b/app/api/cron/upgrade/route.ts
index 56e69472..a06fe916 100644
--- a/app/api/cron/upgrade/route.ts
+++ b/app/api/cron/upgrade/route.ts
@@ -31,7 +31,7 @@ export async function POST(req: Request) {
where: {
plan: {
// exclude users who are on pro or free plan
- notIn: ["pro", "starter", "free"],
+ in: ["trial"],
},
},
select: {
@@ -85,7 +85,7 @@ export async function POST(req: Request) {
return await Promise.allSettled([
log({
message: `Trial End Reminder for team: *${id}* is expiring in ${teamDaysLeft} days, email sent.`,
- type: "cron"
+ type: "cron",
}),
limiter.schedule(() =>
sendTrialEndReminderEmail(userEmail, userName),
@@ -110,7 +110,7 @@ export async function POST(req: Request) {
return await Promise.allSettled([
log({
message: `Final Trial End Reminder for team: *${id}* is expiring in ${teamDaysLeft} days, email sent.`,
- type: "cron"
+ type: "cron",
}),
limiter.schedule(() =>
sendTrialEndFinalReminderEmail(userEmail, userName),
@@ -131,7 +131,7 @@ export async function POST(req: Request) {
return await Promise.allSettled([
log({
message: `Downgrade to free for user: *${id}* is expiring in ${teamDaysLeft} days, downgraded.`,
- type: "cron"
+ type: "cron",
}),
prisma.user.update({
where: { email: userEmail },
@@ -148,7 +148,7 @@ export async function POST(req: Request) {
return NextResponse.json(results);
} catch (error) {
await log({
- message:`Trial end reminder cron failed. Error: " + ${(error as Error).message}`,
+ message: `Trial end reminder cron failed. Error: " + ${(error as Error).message}`,
type: "cron",
mention: true,
});
diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx
index e931f56b..ae93b3f1 100644
--- a/components/billing/upgrade-plan-modal.tsx
+++ b/components/billing/upgrade-plan-modal.tsx
@@ -35,39 +35,34 @@ export function UpgradePlanModal({
const features = useMemo(() => {
if (plan === "Pro") {
return [
- "Folders",
- "3 team members",
- "Unlimited link views",
- "Custom domains",
+ "2 users",
+ "Custom slug",
"Custom branding",
- "Notion documents",
- "AI Document Assistant incl. 1500 credits",
+ "1-year analytics retention",
+ "Advanced access controls",
+ "Folders",
];
}
if (plan === "Business") {
return [
- "Unlimited subfolder levels",
- "10 team members",
+ "3 users",
+ "1 dataroom",
+ "Custom domain",
"Unlimited documents",
- "Unlimited link views",
- "Custom domains",
- "Custom branding",
- "Notion documents",
- "Data room",
- "AI Document Assistant incl. 2500 credits",
- "Priority Support",
+ "Unlimited subfolder levels",
+ "Large file uploads",
+ "48h Priority Support",
];
}
return [
- "Folders",
- "3 team members",
- "Unlimited link views",
- "Custom domains",
+ "2 users",
+ "Custom slug",
"Custom branding",
- "Notion documents",
- "AI Document Assistant incl. 1500 credits",
+ "1-year analytics retention",
+ "Advanced access controls",
+ "Folders",
];
}, [plan]);
@@ -110,7 +105,7 @@ export function UpgradePlanModal({
}}
initial="hidden"
animate="show"
- className="flex flex-col items-center justify-center space-y-3 border-b border-border px-4 py-8 sm:px-16"
+ className="flex flex-col items-center justify-center space-y-3 border-b border-border py-8 sm:px-12"
>
<motion.div variants={STAGGER_CHILD_VARIANTS}>
<p className="text-2xl font-bold tracking-tighter text-foreground">
@@ -131,7 +126,7 @@ export function UpgradePlanModal({
</motion.p>
</motion.div>
- <div className="bg-background px-4 pb-8 text-left sm:px-16">
+ <div className="bg-background pb-8 text-left sm:px-12">
<Tabs className="pb-4" defaultValue={plan}>
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="Pro" onClick={() => setPlan("Pro")}>
@@ -157,9 +152,14 @@ export function UpgradePlanModal({
<Badge
variant="outline"
className="text-sm font-normal normal-case"
- >{`€${
- PLANS.find((p) => p.name === plan)!.price[period].amount
- }/${period.replace("ly", "")}`}</Badge>
+ >
+ {`€${
+ PLANS.find((p) => p.name === plan)!.price[period].amount
+ }/month`}{" "}
+ {period === "yearly" ? (
+ <span className="text-xs ml-1">(billed yearly)</span>
+ ) : null}
+ </Badge>
</div>
<button
onClick={() => {
@@ -167,7 +167,7 @@ export function UpgradePlanModal({
}}
className="text-xs text-muted-foreground underline underline-offset-4 transition-colors hover:text-gray-800 hover:dark:text-muted-foreground/80"
>
- {period === "monthly" ? "Want 20% off?" : "Switch to monthly"}
+ {period === "monthly" ? "Want 35% off?" : "Switch to monthly"}
</button>
</div>
<motion.div
diff --git a/lib/stripe/utils.ts b/lib/stripe/utils.ts
index 025f7d36..f88a7f52 100644
--- a/lib/stripe/utils.ts
+++ b/lib/stripe/utils.ts
@@ -58,10 +58,10 @@ export const PLANS = [
},
},
yearly: {
- amount: 390,
+ amount: 25,
priceIds: {
test: "price_1P3JlWFJyGSZ96lhddEsPKGg",
- production: "price_1P3FQPFJyGSZ96lhXPwLPl49",
+ production: "price_1P6VTgFJyGSZ96lhshdgZ1it",
},
},
},
@@ -78,10 +78,10 @@ export const PLANS = [
},
},
yearly: {
- amount: 790,
+ amount: 59,
priceIds: {
test: "price_1OuYgPFJyGSZ96lhKk6JzTf1",
- production: "price_1OuYedFJyGSZ96lhTaJx58pG",
+ production: "price_1P6VnoFJyGSZ96lhgFscsQ61",
},
},
},