caelum0x d56639a594
Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

71 lines
2.7 KiB
TypeScript

"use client";
import * as React from "react";
import Link from "next/link";
import { ArrowRight } from "lucide-react";
import { Button } from "@/components/ui/button";
import { useBetaLaunchStatus } from "@/app/beta/_lib/use-launch-status";
import { AvailableFormats } from "@/app/beta/_components/AvailableFormats";
import { BetaRequestForm } from "@/app/beta/_components/BetaRequestForm";
export interface ReadinessCtaProps {
/** What to render when the server reports public access (or before it answers). */
readonly publicCta: React.ReactNode;
/** `button`: a compact "Request early access" link; `form`: the full request form. */
readonly betaVariant: "button" | "form";
/** Attribution tag for requests made from this CTA. */
readonly source: string;
/** Where the `button` variant points (an on-page anchor or /beta). */
readonly requestHref?: string;
}
/**
* Readiness-aware CTA. Reads GET /launch/status; while the phase is
* `private_beta` it swaps the signup/create CTA for a request-early-access
* path and lists the formats that render today. Until the status arrives (or
* if it cannot be read) the public CTA stays, since the server enforces the
* signup gate regardless of what the page shows.
*/
export function ReadinessCta({
publicCta,
betaVariant,
source,
requestHref = "/beta",
}: ReadinessCtaProps) {
const { status } = useBetaLaunchStatus();
if (status?.phase !== "private_beta") return <>{publicCta}</>;
if (betaVariant === "form") {
return (
<div className="mt-4 flex flex-col gap-8">
<p className="max-w-xl text-pretty leading-relaxed text-muted-foreground">
Menivor is in a private beta. Request access below; we approve requests by hand
and approved emails sign in normally.
</p>
<BetaRequestForm source={source} />
<AvailableFormats formats={status.availableFormats} className="max-w-xl border-t border-border pt-8" />
</div>
);
}
return (
<div className="flex w-full flex-col items-start gap-5">
<p className="text-sm text-muted-foreground">
Menivor is in a private beta. Request access and we will email you once it is approved.
</p>
<div className="flex flex-wrap items-center gap-3">
<Button asChild size="lg">
<Link href={requestHref}>
Request early access <ArrowRight className="size-4" aria-hidden />
</Link>
</Button>
<Link href="/sign-in" className="text-sm text-muted-foreground underline underline-offset-4">
Already approved? Sign in
</Link>
</div>
<AvailableFormats formats={status.availableFormats} className="max-w-xl" />
</div>
);
}