import { ExternalLink } from "lucide-react"; import type { OwnLogin } from "@peppa/runner"; import { cancelOwnLoginAction, connectOwnSubscriptionAction, finishOwnClaudeLoginAction } from "@/app/(app)/actions"; import { Hidden } from "@/components/cards"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { getT } from "@/lib/i18n"; const step = "flex gap-2.5"; const num = "grid size-5.5 shrink-0 place-items-center rounded-full bg-primary/15 text-xs font-semibold text-primary"; /** * PEP-82: connecting the owner's own subscription without a terminal, in plain steps, right on * the project page — «Подключить Claude» / «Подключить ChatGPT», then the link and the code. */ export async function SubscriptionSetup({ projectId, back, logins }: { projectId: number; back: string; logins: OwnLogin[] }) { const t = await getT(); if (logins.length) { return (
{logins.map((l) => (

{l.provider === "claude" ? t("Подключаем Claude — осталось три шага") : t("Подключаем ChatGPT — осталось два шага")}

1
{l.provider === "claude" ? t("Откройте страницу входа и войдите в свой аккаунт Claude, затем нажмите «Authorize».") : t("Откройте страницу входа и войдите в свой аккаунт ChatGPT.")}
{l.provider === "claude" ? ( <>
2 {t("Claude покажет длинный код — нажмите «Copy code».")}
3
) : (
2
{t("На той странице введите код")} {l.code} {t("и подтвердите вход.")}
)}
))}
); } return (

{t("Подключите подписку — и агенты начнут работать")}

{t("Агенты пишут код на вашей подписке Claude или ChatGPT — подойдёт обычная платная (Claude Pro или Max, ChatGPT Plus или Pro). Это одна минута: вы входите в свой аккаунт, как на любом сайте. Пароль Пеппа не видит.")}

{t("Нет подписки? Оформите её на claude.ai или chatgpt.com и вернитесь сюда. Другие способы (готовый токен, ключ API) — в «⋯ Настройки проекта → Подписки».")}

); }