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 { PlanBillingActions } from "@/components/PlanBillingActions"; import { DashboardShell } from "@/components/DashboardShell"; import { UpgradeProLink } from "@/components/UpgradeProLink"; 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"; 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 .
Videos processed
{selfHosted ? ( quota.used ) : ( <> {quota.remaining} {" "} of {quota.limit} videos > )}
{quota.used} used {quota.bonusQuota > 0 ? ` · +${quota.bonusQuota} bonus` : ""}
)}{user.plan === "PREMIUM" ? `Monthly quota resets on ${quota.resetsIn}` : `Quota resets in ${quota.resetsIn}`}
> )} {selfHosted && (Self-hosted edition: no video or API quotas.
)}
Request a copy of your data or permanently delete your account and associated uploads.