import Link from "next/link"; import { redirect } from "next/navigation"; import { getServerSession } from "next-auth"; import { authOptions } from "@/lib/auth"; import { prisma } from "@/lib/db"; import { AccountPrivacyActions } from "@/components/AccountPrivacyActions"; import { CreditPurchasePanel } from "@/components/CreditPurchasePanel"; import { PlanBillingActions } from "@/components/PlanBillingActions"; import { DashboardShell } from "@/components/DashboardShell"; import { UpgradeProButton } from "@/components/UpgradeProButton"; import { getUserApiKeyStatus } from "@/lib/api-keys"; import { getApiRateLimitStatus } from "@/lib/api-rate-limit"; import { ApiKeySettings } from "@/components/ApiKeySettings"; import { hasProFeatures, isSelfHostedEdition } from "@/lib/edition"; import { EXTENSION_KIND, getQuotaExtensionUsage } from "@/lib/quota-extensions"; import { getQuotaInfo } from "@/lib/quota"; import { isBillingDevMock, isStripeConfigured } from "@/lib/stripe"; import { CreditPurchaseStatus } from "@prisma/client"; const PLAN_LABELS = { FREE: "Bedroom Producer", PREMIUM: "Pro", } as const; function InfoRow({ label, value }: { label: string; value: string }) { return (
YouTube account not connected.
)} {channelUrl && ( Go to your channel )}To refresh your YouTube permissions,{" "} sign out and sign in again .
Video quota remaining
{quota.totalAvailable} {" "} of {quota.limit + quota.extraCredits} videos
{quota.used} monthly used {quota.extraCredits > 0 ? ` · ${quota.extraCredits} extras` : ""} {quota.bonusQuota > 0 ? ` · +${quota.bonusQuota} bonus` : ""}
{`Includes monthly + purchased extras · monthly resets on ${quota.resetsIn}`}
Pro uses your monthly allocation first, then any never-expiring extra credits.
> )}Request a copy of your data or permanently delete your account and associated uploads.