update: plans

This commit is contained in:
2026-03-22 05:46:41 +04:00
parent 2d0f1ce302
commit d159d1b17a
7 changed files with 128 additions and 77 deletions
+23 -21
View File
@@ -1,4 +1,4 @@
export type Plan = "free" | "pro" | "pro4x" | "lifetime";
export type Plan = "free" | "pro" | "pro2x" | "pro4x" | "lifetime";
export interface PlanLimits {
maxMonitors: number;
@@ -6,29 +6,31 @@ export interface PlanLimits {
maxRegions: number;
}
// Base pro limits — multiplied for 2x/4x tiers
const PRO_BASE = { maxMonitors: 200, minIntervalS: 2, maxRegions: 99 };
const PLANS: Record<Plan, PlanLimits> = {
free: {
maxMonitors: 10,
minIntervalS: 30,
maxRegions: 1,
},
pro: {
maxMonitors: 200,
minIntervalS: 2,
maxRegions: 99,
},
pro4x: {
maxMonitors: 800,
minIntervalS: 2,
maxRegions: 99,
},
lifetime: {
maxMonitors: 200,
minIntervalS: 2,
maxRegions: 99,
},
free: { maxMonitors: 10, minIntervalS: 30, maxRegions: 1 },
pro: { ...PRO_BASE },
pro2x: { ...PRO_BASE, maxMonitors: PRO_BASE.maxMonitors * 2 },
pro4x: { ...PRO_BASE, maxMonitors: PRO_BASE.maxMonitors * 4 },
lifetime: { ...PRO_BASE },
};
export function getPlanLimits(plan: string): PlanLimits {
return PLANS[plan as Plan] || PLANS.free;
}
// Display helpers
export const PLAN_LABELS: Record<string, string> = {
free: "Free", pro: "Pro", pro2x: "Pro 2x", pro4x: "Pro 4x", lifetime: "Lifetime",
};
export const PRO_MULTIPLIERS = [
{ plan: "pro", label: "1x", monitors: PRO_BASE.maxMonitors, priceMultiplier: 1 },
{ plan: "pro2x", label: "2x", monitors: PRO_BASE.maxMonitors * 2, priceMultiplier: 2 },
{ plan: "pro4x", label: "4x", monitors: PRO_BASE.maxMonitors * 4, priceMultiplier: 4 },
];
export const PRO_MONTHLY_USD = 12;
export const LIFETIME_USD = 140;