From 66b087bdadb44809314b62d759106de7709b228e Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:33:59 +0000 Subject: [PATCH] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/routes/painel.index.tsx | 91 ++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 17 deletions(-) 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 (
@@ -154,9 +175,9 @@ function ProvisioningCard() {
-

Seu agente Mika está sendo provisionado

+

Estamos preparando seu agente Mika

- 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.

@@ -168,23 +189,25 @@ function ProvisioningCard() {
- {step.state === "active" ? ( - - ) : step.state === "pending" ? ( - i + 1 - ) : ( + {step.state === "done" ? ( + ) : step.state === "active" ? ( + + ) : ( + i + 1 )}

{step.label} @@ -196,3 +219,37 @@ function ProvisioningCard() { ); } + +function ActiveSuccessCard({ botUsername }: { botUsername: string }) { + return ( +

+
+
+
+ +
+
+

Sua Mika está no ar 🎉

+

+ Abra o Telegram e converse com{" "} + @{botUsername} para começar. +

+
+
+ +
+
+ ); +}