diff --git a/src/routes/painel.index.tsx b/src/routes/painel.index.tsx index 189abb8..08f6171 100644 --- a/src/routes/painel.index.tsx +++ b/src/routes/painel.index.tsx @@ -140,13 +140,34 @@ function NoSubscriptionCard() { ); } -function ProvisioningCard() { - const steps = [ - { label: "Provisionar container na VPS", state: "active" as const }, - { label: "Configurar modelo de IA", state: "pending" as const }, - { label: "Conectar seu Telegram", state: "pending" as const }, - { label: "Personalizar seu agente", state: "pending" as const }, +type StepState = "done" | "active" | "pending"; + +function ProvisioningCard({ + telegramConnected, + railwayServiceCreated: _railwayServiceCreated, +}: { + telegramConnected: boolean; + railwayServiceCreated?: boolean; +}) { + // Etapas dinâmicas — sabemos: pagamento confirmado (sempre done aqui), + // Telegram conectado (vem do agent.telegram_bot_username), e o resto + // está em andamento até o railway-webhook chegar como SUCCESS. + const steps: { label: string; state: StepState }[] = [ + { label: "Pagamento confirmado", state: "done" }, + { + label: telegramConnected ? "Telegram conectado" : "Conecte seu Telegram", + state: telegramConnected ? "done" : "active", + }, + { + label: "Provisionando container", + state: telegramConnected ? "active" : "pending", + }, + { + label: "Mika quase pronta!", + state: "pending", + }, ]; + return (
- Você receberá um e-mail quando estiver pronto — geralmente em até 10 minutos. + Geralmente leva de 3 a 5 minutos. Esta página atualiza sozinha quando ficar pronta.
{step.label} @@ -196,3 +219,37 @@ function ProvisioningCard() { ); } + +function ActiveSuccessCard({ botUsername }: { botUsername: string }) { + return ( +
+ Abra o Telegram e converse com{" "} + @{botUsername} para começar. +
+