Open source CapCut alternative.
TypeScript
feat(site): paywall onboarding on phones, gate the app
David Le45b3c3a7f5ed
diff --git a/site/src/app/[locale]/cut/app/layout.tsx b/site/src/app/[locale]/cut/app/layout.tsxindex 0b4ee647..4f368cf5 100644--- a/site/src/app/[locale]/cut/app/layout.tsx+++ b/site/src/app/[locale]/cut/app/layout.tsx@@ -5,6 +5,7 @@ import { NoTranslate } from "@/app/_components/NoTranslate";import { ConnectGate } from "@/cut/components/ConnectGate";import { ExportsDock } from "@/cut/components/ExportsDock";import { CutOnboarding } from "@/cut/components/onboarding/CutOnboarding";+import { PhoneGate } from "@/cut/components/PhoneGate";import { RequireSession } from "@/cut/components/RequireSession";import { AppLoading, AppLoadingOverlay, SessionGate } from "@/cut/components/SessionGate";import { LocaleSync } from "@/cut/components/LocaleSync";@@ -50,15 +51,18 @@ export default function CutAppLayout({ children }: { children: ReactNode }) {<Suspense fallback={<AppLoading />}><RequireSession><LocaleSync />- <ConnectGate>- {children}- {/* App-wide: exports keep showing as you move between projects. Both- overlays read the account, so they wait for it; neither has a- shape worth drawing before then. */}- <SessionGate>- <ExportsDock placement="window" />- </SessionGate>- </ConnectGate>+ {/* A phone gets the page that asks for a computer in the app's place. */}+ <PhoneGate>+ <ConnectGate>+ {children}+ {/* App-wide: exports keep showing as you move between projects. Both+ overlays read the account, so they wait for it; neither has a+ shape worth drawing before then. */}+ <SessionGate>+ <ExportsDock placement="window" />+ </SessionGate>+ </ConnectGate>+ </PhoneGate>{/* Outside the gate so a first run covers the whole window, gate andall, and hands over to it when the last slide closes. */}<SessionGate>diff --git a/site/src/cut/components/PhoneGate.tsx b/site/src/cut/components/PhoneGate.tsxnew file mode 100644index 00000000..9456f934--- /dev/null+++ b/site/src/cut/components/PhoneGate.tsx@@ -0,0 +1,54 @@+"use client";++import { usePathname } from "next/navigation";+import { useTranslations } from "next-intl";+import { useEffect, type ReactNode } from "react";++import { DonkeyMark } from "@/components/DonkeyMark";+import { useEnvironment, useFormFactor } from "@/cut/lib/environment";+import { useCutBase } from "@/cut/lib/nav";+import { track } from "@/lib/analytics";++// The editor needs a computer. A phone that reaches the app past the welcome+// sequence gets this page in its place, and the app underneath never mounts,+// so the phone decodes and draws nothing it can't use. Settings stays open:+// the trip back from a plan's checkout lands there. The ChatGPT card is its own+// surface and keeps the editor wherever it runs.+export function PhoneGate({ children }: { children: ReactNode }) {+ const phone = useFormFactor() === "phone";+ const { chatgpt } = useEnvironment();+ const base = useCutBase();+ const pathname = usePathname();+ const gated = phone && !chatgpt && !pathname.includes(`${base}/settings`);++ useEffect(() => {+ if (!gated) {+ return;+ }+ track("phone_gate_shown");+ }, [gated]);++ if (!gated) {+ return children;+ }+ return <PhonePage />;+}++function PhonePage() {+ const t = useTranslations("onboarding.phoneGate");+ return (+ <div className="fixed inset-0 z-[70] flex flex-col items-center justify-center gap-6 bg-cream px-6 text-center font-system text-foreground antialiased dark:bg-background">+ <span className="flex size-[59px] items-center justify-center overflow-hidden rounded-[10px]">+ <DonkeyMark alt="" />+ </span>+ <div className="max-w-[360px]">+ <h1 className="text-[26px] leading-[1.15] font-semibold tracking-[-0.02em] text-balance">+ {t("title")}+ </h1>+ <p className="mt-3 text-[16px] leading-[1.55] text-foreground/70">+ {t("body")}+ </p>+ </div>+ </div>+ );+}diff --git a/site/src/cut/components/onboarding/CutOnboarding.tsx b/site/src/cut/components/onboarding/CutOnboarding.tsxindex 8c8380e2..5d21afa3 100644--- a/site/src/cut/components/onboarding/CutOnboarding.tsx+++ b/site/src/cut/components/onboarding/CutOnboarding.tsx@@ -9,10 +9,11 @@ import { Button } from "@/components/ui/button";import { AiChatSlide } from "@/cut/components/onboarding/slides/AiChat";import { CreditsSlide } from "@/cut/components/onboarding/slides/Credits";import { ModesSlide } from "@/cut/components/onboarding/slides/Modes";-import { PlansSlide } from "@/cut/components/onboarding/slides/Plans";+import { PlansSlide, type PlansExit } from "@/cut/components/onboarding/slides/Plans";import { ReferralSlide } from "@/cut/components/onboarding/slides/Referral";import { WelcomeSlide } from "@/cut/components/onboarding/slides/Welcome";import { useEngineUser } from "@/cut/lib/backend/hooks";+import { useFormFactor } from "@/cut/lib/environment";import { useCutBase } from "@/cut/lib/nav";import { onOpenOnboarding, setOnboardingCover } from "@/cut/lib/onboarding";import { track } from "@/lib/analytics";@@ -71,6 +72,9 @@ export function CutOnboarding() {const { data: state, isPending } = useOnboardingState();const { data: pro } = useProSubscription();const save = useSaveOnboarding();+ // A phone ends on the plans with no free way out: the editor needs a+ // computer, so the phone's job is the account and the plan.+ const exit: PlansExit = useFormFactor() === "phone" ? "paywall" : "free";const [rawStep, setStep] = useState(0);const saved = useMemo(() => (state?.referralSources ?? []).filter(isKnownReferralSource), [state]);const savedOther = saved.includes("other") ? (state?.referralOther ?? "") : "";@@ -136,6 +140,21 @@ export function CutOnboarding() {track("onboarding_started", { source: run });}, [run]);+ // Each slide starts at its top. The scroll area outlives the slides, so a+ // tall one scrolled down would hand its offset to the next.+ const scroller = useRef<HTMLDivElement>(null);+ useEffect(() => {+ scroller.current?.scrollTo({ top: 0 });+ }, [slide]);++ // Each slide once per showing, so a run that stops short says where.+ useEffect(() => {+ if (!run || !slide) {+ return;+ }+ track("onboarding_slide_viewed", { source: run, slide, step });+ }, [run, slide, step]);+// The editor underneath reads this to hold the starter project's first// playback until the slides hand over.useEffect(() => {@@ -225,7 +244,11 @@ export function CutOnboarding() {useEffect(() => {if (!run) return;const onKey = (event: KeyboardEvent) => {- if (event.key === "Escape") return finish(true);+ if (event.key === "Escape") {+ // Behind the paywall Escape is no way out; a subscriber has no paywall.+ if (exit === "paywall" && !isPro) return;+ return finish(true);+ }if (event.key === "ArrowLeft") return back();if (event.key === "ArrowRight") return advance();if (event.key !== "Enter") return;@@ -240,7 +263,7 @@ export function CutOnboarding() {};window.addEventListener("keydown", onKey);return () => window.removeEventListener("keydown", onKey);- }, [run, back, advance, finish]);+ }, [run, back, advance, finish, exit, isPro]);// The landing nav's lockup, same icon box and wordmark size. Shared by the// hold below and the open sequence, so one becoming the other repaints@@ -316,7 +339,7 @@ export function CutOnboarding() {{/* Slides sit high rather than centered: the spacers split the free spaceone part above to three below. They collapse first, so a slide tallerthan the window scrolls from its top instead of being clipped. */}- <div className="flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto px-6 py-4 md:px-10">+ <div ref={scroller} className="flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto px-6 py-4 md:px-10"><div aria-hidden className="min-h-4 flex-[1]" /><div className="mx-auto w-full max-w-[1100px]">{slide === "welcome" && <WelcomeSlide />}@@ -336,7 +359,7 @@ export function CutOnboarding() {/>)}{slide === "ai-chat" && <AiChatSlide />}- {slide === "plans" && <PlansSlide run={run} onSkipPro={() => finish(false)} />}+ {slide === "plans" && <PlansSlide run={run} exit={exit} onSkipPro={() => finish(false)} />}</div><div aria-hidden className="flex-[3]" /></div>diff --git a/site/src/cut/components/onboarding/slides/Plans.tsx b/site/src/cut/components/onboarding/slides/Plans.tsxindex 98274ec8..06698a7d 100644--- a/site/src/cut/components/onboarding/slides/Plans.tsx+++ b/site/src/cut/components/onboarding/slides/Plans.tsx@@ -31,7 +31,10 @@ const PLAN_CARD: Record<PaidPlan, { color: CardColor; tapeColor: CardColor }> =// nobody has to take a price on faith. Checkout is the one the upgrade modal// starts. While the intro offer is open the Pro card prices the discount and// counts down to its end.-export function PlansSlide({ run, onSkipPro }: { run: OnboardingRun; onSkipPro: () => void }) {+/** How the slide lets a free account go: on with free, or nowhere but a plan. */+export type PlansExit = "free" | "paywall";++export function PlansSlide({ run, exit, onSkipPro }: { run: OnboardingRun; exit: PlansExit; onSkipPro: () => void }) {const t = useTranslations("onboarding.plans");const plans = useCutPlans();const checkout = usePlanCheckout({ surface: "onboarding" });@@ -46,8 +49,8 @@ export function PlansSlide({ run, onSkipPro }: { run: OnboardingRun; onSkipPro:return;}tracked.current = true;- track("onboarding_plans_shown", { source: run, intro: intro.data?.percentOff ?? 0 });- }, [intro.isPending, intro.data, run]);+ track("onboarding_plans_shown", { source: run, intro: intro.data?.percentOff ?? 0, exit });+ }, [intro.isPending, intro.data, run, exit]);return (<div className="mx-auto w-full max-w-[1040px]">@@ -55,7 +58,7 @@ export function PlansSlide({ run, onSkipPro }: { run: OnboardingRun; onSkipPro:{t("title")}</h2><p className="mt-3 text-center text-[16px] text-foreground/70">- {t("subtitle")}+ {exit === "paywall" ? t("paywallSubtitle") : t("subtitle")}</p>{/* A narrow window scrolls the cards sideways. The row bleeds past the@@ -83,15 +86,18 @@ export function PlansSlide({ run, onSkipPro }: { run: OnboardingRun; onSkipPro:))}</div>- <div className="mt-5 text-right">- <button- type="button"- onClick={onSkipPro}- className="text-[15px] text-foreground/70 underline-offset-4 transition-colors hover:text-foreground hover:underline"- >- {t("continueFree")}- </button>- </div>+ {/* Behind the paywall the plans are the only way on. */}+ {exit === "free" && (+ <div className="mt-5 text-right">+ <button+ type="button"+ onClick={onSkipPro}+ className="text-[15px] text-foreground/70 underline-offset-4 transition-colors hover:text-foreground hover:underline"+ >+ {t("continueFree")}+ </button>+ </div>+ )}</div>);}diff --git a/site/src/cut/components/onboarding/slides/Referral.tsx b/site/src/cut/components/onboarding/slides/Referral.tsxindex 663796df..546b7f76 100644--- a/site/src/cut/components/onboarding/slides/Referral.tsx+++ b/site/src/cut/components/onboarding/slides/Referral.tsx@@ -54,11 +54,13 @@ export function ReferralSlide({<p className="mt-3 text-center text-[16px] text-foreground/70">{t("body")}</p>- <div className="mt-8 flex flex-col gap-2">+ {/* Two columns on a phone, so the question and every answer fit on one+ screen; Other spans both for the field under it. */}+ <div className="mt-6 grid grid-cols-2 gap-2 md:mt-8 md:flex md:flex-col">{REFERRAL_SOURCES.map((source) => {const active = selected.includes(source.id);return (- <div key={source.id} className="relative">+ <div key={source.id} className={cn("relative", source.id === "other" && "col-span-2")}><buttontype="button"onClick={() => onToggle(source.id)}@@ -66,7 +68,7 @@ export function ReferralSlide({className={cn(// Selection is a border and a check, not a filled row: the// brand marks keep their own colors and stay legible.- "relative z-[1] flex w-full items-center gap-3 rounded-xl border bg-card px-4 py-3.5 text-left text-[15px] font-medium transition-colors",+ "relative z-[1] flex h-full w-full items-center gap-2.5 rounded-xl border bg-card px-3 py-3 text-left text-[15px] font-medium transition-colors md:gap-3 md:px-4 md:py-3.5",active? "border-foreground ring-1 ring-foreground": "border-foreground/15 hover:border-foreground/40",diff --git a/site/src/cut/components/onboarding/slides/Welcome.tsx b/site/src/cut/components/onboarding/slides/Welcome.tsxindex 0cade556..df5f9ee5 100644--- a/site/src/cut/components/onboarding/slides/Welcome.tsx+++ b/site/src/cut/components/onboarding/slides/Welcome.tsx@@ -19,9 +19,8 @@ export function WelcomeSlide() {</p></div>{/* Contained rather than width-driven: on a short window the mock gives- up size instead of pushing the slide into a scroll. On mobile it- cancels the slide's padding and runs edge to edge. */}- <div className="-mx-6 h-[min(56vh,640px)] w-[calc(100%+3rem)] max-w-[1060px] md:mx-0 md:w-full">+ up size instead of pushing the slide into a scroll. */}+ <div className="hidden h-[min(56vh,640px)] w-full max-w-[1060px] md:block"><EditorMockproject="onboarding"fit="contain"@@ -29,6 +28,11 @@ export function WelcomeSlide() {frame="card"/></div>+ {/* A phone is width-bound, so the mock takes the width edge to edge and+ its own height, with no empty band above or below it. */}+ <div className="-mx-6 w-[calc(100%+3rem)] md:hidden">+ <EditorMock project="onboarding" showSwitcher={false} frame="card" />+ </div></div>);}diff --git a/site/src/cut/lib/environment.ts b/site/src/cut/lib/environment.tsindex b5c75238..74d9bef3 100644--- a/site/src/cut/lib/environment.ts+++ b/site/src/cut/lib/environment.ts@@ -25,3 +25,24 @@ export function useEnvironment() {const host = useSyncExternalStore(subscribe, editorHost, serverHost);return { host, chatgpt: host === "chatgpt" };}++/** The kind of device the page is on. A phone gets the welcome sequence and+ * the plans, and the editor itself asks for a computer. */+export type FormFactor = "phone" | "computer";++// The browser's own answer where it gives one (Chromium's client hints), the+// user agent's mobile token everywhere else. Tablets count as computers.+function formFactor(): FormFactor {+ if (typeof navigator === "undefined") return "computer";+ const hinted = (navigator as Navigator & { userAgentData?: { mobile?: boolean } }).userAgentData?.mobile;+ if (hinted !== undefined) return hinted ? "phone" : "computer";+ return /iPhone|iPod|Android.+Mobile|Mobile.+Firefox/.test(navigator.userAgent) ? "phone" : "computer";+}++const serverFormFactor = (): FormFactor => "computer";++/** The form factor as React state: the server and the first client render+ * agree on a computer, and a phone settles right after hydration. */+export function useFormFactor(): FormFactor {+ return useSyncExternalStore(subscribe, formFactor, serverFormFactor);+}diff --git a/site/src/i18n/messages/.source-lock.json b/site/src/i18n/messages/.source-lock.jsonindex 4e2dd431..888185ef 100644--- a/site/src/i18n/messages/.source-lock.json+++ b/site/src/i18n/messages/.source-lock.json@@ -2518,12 +2518,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"de/panels": {@@ -5541,12 +5544,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"es/panels": {@@ -8564,12 +8570,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"fr/panels": {@@ -11587,12 +11596,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"ja/panels": {@@ -14610,12 +14622,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"ko/panels": {@@ -17633,12 +17648,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"pt-BR/panels": {@@ -20656,12 +20674,15 @@"credits.onUs": "d8bcd92ba9cd","credits.body": "a5bee6fbad92","credits.expires": "49370980c228",+ "phoneGate.title": "7c611b86cca8",+ "phoneGate.body": "368650b59762","plans.title": "c0c6a5e91743","plans.subtitle": "e0d25a257d31","plans.bestValue": "8173c2a946f1","plans.getPlan": "36572be917c8","plans.getProOff": "295f4fc9c6f1","plans.continueFree": "d7f2a5d8710f",+ "plans.paywallSubtitle": "9609471d3646","plans.covers": "42fa1aae2a8e"},"zh-CN/panels": {diff --git a/site/src/i18n/messages/de/onboarding.json b/site/src/i18n/messages/de/onboarding.jsonindex bbc05730..63a606cd 100644--- a/site/src/i18n/messages/de/onboarding.json+++ b/site/src/i18n/messages/de/onboarding.json@@ -49,6 +49,10 @@"body": "Bereits auf deinem Konto – du musst nichts aktivieren. Nutze sie für generierte Videos, Audio und Bilder.","expires": "Gültig bis {date}."},+ "phoneGate": {+ "title": "Donkey Cut läuft auf einem Computer",+ "body": "Öffne donkeycut.com auf deinem Mac oder PC."+ },"plans": {"title": "Einfache Preise","subtitle": "Der Editor ist kostenlos. Zahle nur für KI-generierte Medien.",@@ -56,6 +60,7 @@"getPlan": "Hol dir {plan}","getProOff": "{percent} % Rabatt auf Pro sichern","continueFree": "Kostenlos weitermachen",+ "paywallSubtitle": "Wähle einen Plan, um loszulegen. Du bearbeitest auf einem Computer: Melde dich dort mit diesem Account an.","covers": "{months, plural, one {Für deinen ersten Monat, danach {price}/Monat} other {Pro Monat für deine ersten # Monate, danach {price}/Monat}}"}}diff --git a/site/src/i18n/messages/en/onboarding.json b/site/src/i18n/messages/en/onboarding.jsonindex 2a8a8c14..0356715c 100644--- a/site/src/i18n/messages/en/onboarding.json+++ b/site/src/i18n/messages/en/onboarding.json@@ -49,6 +49,10 @@"body": "Already in your account — nothing to claim. Spend them on generated video, audio and images.","expires": "Expires {date}."},+ "phoneGate": {+ "title": "Donkey Cut runs on a computer",+ "body": "Open donkeycut.com on your Mac or PC."+ },"plans": {"title": "Simple pricing","subtitle": "The editor is free. Pay only for AI generated media.",@@ -56,6 +60,7 @@"getPlan": "Get {plan}","getProOff": "Get {percent}% off Pro","continueFree": "Continue with free",+ "paywallSubtitle": "Pick a plan to start. You edit on a computer: sign in there with this account.","covers": "{months, plural, one {For your first month, then {price}/month} other {Per month for your first # months, then {price}/month}}"}}diff --git a/site/src/i18n/messages/es/onboarding.json b/site/src/i18n/messages/es/onboarding.jsonindex b8135662..b3862bcb 100644--- a/site/src/i18n/messages/es/onboarding.json+++ b/site/src/i18n/messages/es/onboarding.json@@ -49,6 +49,10 @@"body": "Ya están en tu cuenta; no tienes que reclamar nada. Úsalos en video, audio e imágenes generadas.","expires": "Vence el {date}."},+ "phoneGate": {+ "title": "Donkey Cut funciona en una computadora",+ "body": "Abre donkeycut.com en tu Mac o PC."+ },"plans": {"title": "Precios simples","subtitle": "El editor es gratis. Paga solo por multimedia generada por IA.",@@ -56,6 +60,7 @@"getPlan": "Obtén {plan}","getProOff": "Obtén {percent}% de descuento en Pro","continueFree": "Continuar gratis",+ "paywallSubtitle": "Elige un plan para comenzar. Editas en una computadora: inicia sesión ahí con esta cuenta.","covers": "{months, plural, one {Durante tu primer mes, luego {price}/mes} other {Al mes durante tus primeros # meses, luego {price}/mes}}"}}diff --git a/site/src/i18n/messages/fr/onboarding.json b/site/src/i18n/messages/fr/onboarding.jsonindex 556ad9f6..18a30d54 100644--- a/site/src/i18n/messages/fr/onboarding.json+++ b/site/src/i18n/messages/fr/onboarding.json@@ -49,6 +49,10 @@"body": "Déjà sur votre compte — rien à réclamer. Utilisez-les pour générer de la vidéo, de l'audio et des images.","expires": "Expire le {date}."},+ "phoneGate": {+ "title": "Donkey Cut s'utilise sur ordinateur",+ "body": "Ouvrez donkeycut.com sur votre Mac ou PC."+ },"plans": {"title": "Tarifs simples","subtitle": "L'éditeur est gratuit. Ne payez que pour les médias générés par IA.",@@ -56,6 +60,7 @@"getPlan": "Obtenir {plan}","getProOff": "Obtenez {percent} % de réduction sur Pro","continueFree": "Continuer avec la version gratuite",+ "paywallSubtitle": "Choisissez un forfait pour commencer. Le montage se fait sur ordinateur : connectez-vous-y avec ce compte.","covers": "{months, plural, one {Pour votre premier mois, puis {price}/mois} other {Par mois pendant vos # premiers mois, puis {price}/mois}}"}}diff --git a/site/src/i18n/messages/ja/onboarding.json b/site/src/i18n/messages/ja/onboarding.jsonindex f8a4c1bf..cafa30de 100644--- a/site/src/i18n/messages/ja/onboarding.json+++ b/site/src/i18n/messages/ja/onboarding.json@@ -49,6 +49,10 @@"body": "すでにアカウントに付与されています(受け取り手続きは不要です)。動画、音声、画像の生成にご利用いただけます。","expires": "有効期限: {date}"},+ "phoneGate": {+ "title": "Donkey Cutはコンピューターで動作します",+ "body": "MacまたはPCでdonkeycut.comを開いてください。"+ },"plans": {"title": "シンプルな料金プラン","subtitle": "エディターは無料。AI生成メディアにのみお支払いいただけます。",@@ -56,6 +60,7 @@"getPlan": "{plan}を入手","getProOff": "Proを{percent}%オフで利用","continueFree": "無料で続ける",+ "paywallSubtitle": "プランを選んで始めましょう。編集はコンピューターで行います。そちらでこのアカウントでサインインしてください。","covers": "{months, plural, other {最初の#か月間の月額、以降は{price}/月}}"}}diff --git a/site/src/i18n/messages/ko/onboarding.json b/site/src/i18n/messages/ko/onboarding.jsonindex 0e5304dd..97f18be0 100644--- a/site/src/i18n/messages/ko/onboarding.json+++ b/site/src/i18n/messages/ko/onboarding.json@@ -49,6 +49,10 @@"body": "계정에 이미 지급되어 있어 별도 등록 없이 바로 쓸 수 있어요. 비디오, 오디오, 이미지 생성에 자유롭게 사용해 보세요.","expires": "만료일: {date}"},+ "phoneGate": {+ "title": "Donkey Cut은 컴퓨터에서 실행돼요",+ "body": "Mac 또는 PC에서 donkeycut.com을 열어주세요."+ },"plans": {"title": "단순한 요금제","subtitle": "편집기는 무료예요. AI로 생성하는 미디어에 대해서만 결제하세요.",@@ -56,6 +60,7 @@"getPlan": "{plan} 시작하기","getProOff": "Pro {percent}% 할인받기","continueFree": "무료로 계속하기",+ "paywallSubtitle": "시작할 요금제를 선택해 주세요. 편집은 컴퓨터에서 진행되니 컴퓨터에서 이 계정으로 로그인해 주세요.","covers": "{months, plural, other {첫 #개월 동안 적용되며, 이후 월 {price}}}"}}diff --git a/site/src/i18n/messages/pt-BR/onboarding.json b/site/src/i18n/messages/pt-BR/onboarding.jsonindex 2d802ce8..ea3095ce 100644--- a/site/src/i18n/messages/pt-BR/onboarding.json+++ b/site/src/i18n/messages/pt-BR/onboarding.json@@ -49,6 +49,10 @@"body": "Já estão na sua conta — não precisa resgatar. Use para gerar vídeos, áudios e imagens.","expires": "Expira em {date}."},+ "phoneGate": {+ "title": "O Donkey Cut funciona no computador",+ "body": "Abra o donkeycut.com no seu Mac ou PC."+ },"plans": {"title": "Preços simples","subtitle": "O editor é grátis. Pague apenas por mídias geradas por IA.",@@ -56,6 +60,7 @@"getPlan": "Obter {plan}","getProOff": "Garanta {percent}% de desconto no Pro","continueFree": "Continuar grátis",+ "paywallSubtitle": "Escolha um plano para começar. Você edita no computador: entre lá com esta conta.","covers": "{months, plural, one {No seu primeiro mês, depois {price}/mês} other {Por mês nos seus primeiros # meses, depois {price}/mês}}"}}diff --git a/site/src/i18n/messages/zh-CN/onboarding.json b/site/src/i18n/messages/zh-CN/onboarding.jsonindex df308974..0a5c2236 100644--- a/site/src/i18n/messages/zh-CN/onboarding.json+++ b/site/src/i18n/messages/zh-CN/onboarding.json@@ -49,6 +49,10 @@"body": "已存入你的账户,无需手动领取。可用于生成视频、音频和图像。","expires": "有效期至 {date}。"},+ "phoneGate": {+ "title": "Donkey Cut 需在电脑上运行",+ "body": "在 Mac 或 PC 上打开 donkeycut.com。"+ },"plans": {"title": "简单明了的定价","subtitle": "编辑器完全免费,仅为 AI 生成的媒体内容付费。",@@ -56,6 +60,7 @@"getPlan": "获取 {plan}","getProOff": "立享 {percent}% 优惠升级 Pro","continueFree": "继续使用免费版",+ "paywallSubtitle": "选择方案以开始。剪辑需在电脑上进行:使用此账号在电脑端登录即可。","covers": "{months, plural, other {前 # 个月每月此价格,之后 {price}/月}}"}}diff --git a/site/src/lib/analytics.ts b/site/src/lib/analytics.tsindex 3f42b136..29b2b328 100644--- a/site/src/lib/analytics.ts+++ b/site/src/lib/analytics.ts@@ -60,7 +60,10 @@ export type AnalyticsEvents = {};onboarding_completed: { source: OnboardingRun; skipped: boolean; step: number };// The sequence's plans slide came up; intro as on the plans modal.- onboarding_plans_shown: { source: OnboardingRun; intro: number };+ // exit is "paywall" on a phone, where the slide has no free way on.+ onboarding_plans_shown: { source: OnboardingRun; intro: number; exit: "free" | "paywall" };+ // A phone reached the app past the sequence and was asked for a computer.+ phone_gate_shown: void;// The first things a new account does in the editor. An import reports// once per run of files the person brought in: how many landed, how many// didn't, and whether they went on the timeline or only into Media.