Ship free-tier watermark policy (2 clean renders) and align pricing/legal copy.
This commit is contained in:
+7
-1
@@ -7,8 +7,9 @@ import {
|
||||
} from "./billing";
|
||||
import { FREE_EXTRA_CREDITS_MAX, MAX_CREDIT_CAP, PRO_UPGRADE_REQUIRED_SUFFIX, monthlyCreditsForPlan } from "./credits";
|
||||
import { prisma } from "./db";
|
||||
import { isSelfHostedEdition } from "./edition";
|
||||
import { hasProFeatures, isSelfHostedEdition } from "./edition";
|
||||
import { getNextMonthlyQuotaReset, getPlanLimits } from "./plans";
|
||||
import { watermarkFreeRendersRemaining } from "./watermark-policy";
|
||||
|
||||
export function formatQuotaResetCountdown(resetsAt: Date | string): string {
|
||||
const target = typeof resetsAt === "string" ? new Date(resetsAt) : resetsAt;
|
||||
@@ -106,6 +107,11 @@ export async function getQuotaInfo(userId: string) {
|
||||
resetsAt: user.quotaResetAt.toISOString(),
|
||||
resetsIn: formatQuotaResetDisplay(user.plan, user.quotaResetAt),
|
||||
plan: user.plan,
|
||||
subscriptionStatus: hasProFeatures(user.plan) ? ("pro" as const) : ("free" as const),
|
||||
createdVideoCount: user.createdVideoCount,
|
||||
watermarkFreeRemaining: hasProFeatures(user.plan)
|
||||
? null
|
||||
: watermarkFreeRendersRemaining(user.createdVideoCount),
|
||||
maxBatchSize: limits.maxBatchSize,
|
||||
watermarkOptional: limits.watermarkOptional,
|
||||
customWatermark: limits.customWatermark,
|
||||
|
||||
Reference in New Issue
Block a user