Skip to content

Commit 65f9936

Browse files
Update Academy & Navigations
Refactored AIChatbot, ScrollToTop, Academy partners, and navigation menus. Added ACE AGameFlow and AlienTrip links. Fixed partner logo fallbacks and improved ConnectButton UX. X-Lovable-Edit-ID: edt-76f35780-6bf9-4b59-a2ab-5bad58556c44 Co-authored-by: Alien69Flow <111972684+Alien69Flow@users.noreply.github.com>
2 parents 4fe5044 + 87f44a9 commit 65f9936

7 files changed

Lines changed: 142 additions & 181 deletions

File tree

.lovable/plan.md

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,2 @@
11

2-
3-
# Plan de Actualización Integral: AlienFlowSpace dApp
4-
5-
---
6-
7-
## Problemas Identificados
8-
9-
1. **Botón AI Tor se superpone con ScrollToTop** - Ambos en `bottom-6/8 right-6/8`, z-index conflictivo
10-
2. **Chat AI Tor muy pequeño al abrirse** - El iframe de aitor.lovable.app apenas muestra contenido útil
11-
3. **Falta opción para abrir AI Tor en URL completa** - No hay botón "Open in new tab"
12-
4. **Menú sin enlaces a Telegram MiniApp (ACE/AGameFlow) ni AlienTrip directo**
13-
5. **Logos de partners en Academy** - Varios externos (Meslo, Motus DAO, My DNA Bank) probablemente rotos (URLs inventadas)
14-
6. **Wallet Connect button** - Funcionalidad básica pero sin feedback visual claro ni manejo de errores robusto
15-
16-
---
17-
18-
## Cambios a Implementar
19-
20-
### 1. Fix Botón AI Tor vs ScrollToTop (Solapamiento)
21-
22-
**`src/components/ScrollToTop.tsx`**: Mover a `bottom-8 left-8` (esquina inferior izquierda) para evitar conflicto con AI Tor que está en `bottom-6 right-6`.
23-
24-
**`src/components/AIChatbot.tsx`**:
25-
- Añadir botón "Open Full" (ExternalLink icon) en el header del chat que abre `https://aitor.lovable.app/` en nueva pestaña
26-
- Aumentar tamaño del chat window: `h-[80vh] max-h-[700px]` y `sm:w-[420px] md:w-[480px]`
27-
- Mejorar el header con botón de expandir a pantalla completa
28-
29-
### 2. Menú: Nuevos enlaces
30-
31-
**`src/components/Header/DesktopNav.tsx`** y **`src/components/Header/MobileNav.tsx`**:
32-
- Añadir en el dropdown "EXPLORE SPACES" un separador y sección "APPS" con:
33-
- **ACE AGameFlow** → enlace externo a la Telegram MiniApp (necesito URL, usaré placeholder `https://t.me/AlienFlowBot`)
34-
- **AlienTrip** ya está en navLinks principales, verificar que funcione
35-
36-
### 3. Academy Partners - Fix logos rotos
37-
38-
**`src/pages/Academy.tsx`**:
39-
- **HEALTHFLOW**: Reemplazar URLs inventadas (meslo.com/logo.svg, motusdao.io/logo.svg, mydnabank.com/logo.png) por iconos Lucide como fallback visual (Heart, Activity, Dna) ya que no existen logos verificables
40-
- **SPACEFLOW**: SpaceX logo de Wikipedia puede fallar por CORS; usar fallback con `onError`
41-
- Mejorar el diseño de la sección partners: aumentar tamaño de logos a `w-11 h-11`, mejorar spacing
42-
- Añadir título de sección más prominente con icono
43-
44-
### 4. Wallet Connect - Mejoras
45-
46-
**`src/components/Header/ConnectButton.tsx`**:
47-
- Simplificar el layout del AI Key (quitar show/hide, mostrar solo icono de copia)
48-
- Mejorar feedback visual del estado de conexión
49-
- Añadir indicador de red (network badge)
50-
- Fix: el componente `regenerateAIKey` se importa pero no se usa en el render
51-
52-
### 5. UI/UX Global Polish
53-
54-
**Todos los archivos afectados**:
55-
- Consistencia en rounded corners (`rounded-2xl`)
56-
- Hover transitions uniformes (`hover:scale-[1.01] transition-all duration-300`)
57-
- Mejorar contraste de textos sobre fondos oscuros
58-
59-
---
60-
61-
## Archivos a Modificar
62-
63-
| Archivo | Cambio Principal |
64-
|---------|-----------------|
65-
| `src/components/ScrollToTop.tsx` | Mover a esquina inferior izquierda |
66-
| `src/components/AIChatbot.tsx` | Botón "Open Full", tamaño mayor, UI mejorada |
67-
| `src/components/Header/DesktopNav.tsx` | Añadir sección APPS en dropdown |
68-
| `src/components/Header/MobileNav.tsx` | Añadir sección APPS en acordeón |
69-
| `src/pages/Academy.tsx` | Fix logos rotos, mejorar diseño partners |
70-
| `src/components/Header/ConnectButton.tsx` | Simplificar, mejorar feedback |
71-
72-
---
73-
74-
## Pregunta Pendiente
75-
76-
Necesito la URL exacta de la Telegram MiniApp de ACE AGameFlow para el menú. Si no la tienes, usaré un placeholder que puedas actualizar después.
77-
2+
Aquí tienes el plan de acción corregido y ultra-detallado. He inyectado tus instrucciones de jerarquía, la nueva categoría estratégica CashFlow, el orden alfabético y la restauración estética del día 23.Copia este texto y pégalo directamente en el botón "Edit Plan" de Lovable antes de darle a "Approve".Academy Page Redesign Plan: Quantum Restoration & Strategic Expansion1. Hero Header: 23rd Jan RestorationPriority: Restore the high-tech visual identity exactly as it was on January 23rd.Circular Logo Frame: Restore the double-ring circular frame with depth shadows and the "Quantum Glow" (pulsating animation).Typography: Reset title to 'Nasalization' font with the original green/gold gradient and drop-shadow.Subtitle/Quote: Restore the italicized, wide-spaced subtitle with the original golden-muted color palette.Spacing: Do not over-compact. Maintain the original vertical breathing room that felt premium.2. Partners: Logical & Institutional RestructuringOrganize all partners ALPHABETICALLY within these specific categories:CategoryIncluded PartnersACADEMY PARTNERSAcademia, AulaFacil, Coursera, Cursa, edX, GrowGoogle, Hotmart, MasterClass, Mooc, SkillShare, Udacity, UNED.CASHFLOWAzrael Codex (Bitget), Predik.HEALTHFLOWMeslo Ltd, Motus DAO, My DNA Bank, Proton, Yazio.DATAFLOWAlchemy, HackMD, HackerRank.ECOFLOWClimateReanalyzer, OEGlobal, OpenUpEd.GAMEFLOWExplore, Unity Learn.SPACEFLOWESA, KAGRA, LIGO, LSC, NASA, UNESCO, UNSSC, Virgo.3. Asset & Logo IntegrityPriority 1: Use all files from /lovable-uploads/Academy/ (matching the GitHub repository).Priority 2: For missing official logos (NASA, Coursera, Proton, etc.), use high-resolution official Wiki/External URLs as previously implemented.Visuals: Maintain the grayscale to color filter on hover.Links: Ensure every partner has its functional external link.4. UI/UX Polish (Contact Us & Global)Contact Page: Fix the H1 separator by adding horizontal gradient lines (transparent -> alien-green -> transparent) to the sides of the center dot.Chat Bubble: Add the triangular "comic-style" pointer to the message bubble in the Contact section to make it look like a real chat.Interactions: Ensure all cards use the scale-[1.01] transition with a 300ms duration.5. Technical ImplementationUpdate src/pages/Academy.tsx as a single, clean file.Ensure the partnerCategories constant reflects the alphabetical order and the new CashFlow category.6. Proactive ExpansionIntegrate 2 or 3 additional high-prestige institutions in SpaceFlow or HealthFlow (e.g., SpaceX, CERN, or major BioTech labs) if high-quality logos are available, to enhance institutional weight.

src/components/AIChatbot.tsx

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { useEffect, useState, useMemo, useCallback } from 'react';
1+
import React, { useEffect, useState, useMemo } from 'react';
22
import { motion, AnimatePresence } from 'framer-motion';
3-
import { X, Loader2, Sparkles, Rocket, Zap } from 'lucide-react';
3+
import { X, Loader2, Sparkles, Rocket, Zap, ExternalLink } from 'lucide-react';
44
import aiTorAvatar from '@/assets/ai-tor-avatar.jpg';
55

66
const AI_DAPP_ROLES = [
@@ -18,7 +18,6 @@ const AIChatbot = () => {
1818

1919
const currentRole = useMemo(() => AI_DAPP_ROLES[currentRoleIndex], [currentRoleIndex]);
2020

21-
// Gestión Proactiva (Tiempos 18s / 33s)
2221
useEffect(() => {
2322
if (hasInteracted || isOpen) return;
2423
const timer = setTimeout(() => {
@@ -29,7 +28,6 @@ const AIChatbot = () => {
2928
return () => clearTimeout(timer);
3029
}, [hasInteracted, isOpen]);
3130

32-
// Tracking de interacción (Escucha si el usuario mueve el mouse o tecla)
3331
useEffect(() => {
3432
const handleInteraction = () => setHasInteracted(true);
3533
const events = ['mousedown', 'keydown', 'touchstart'];
@@ -39,7 +37,7 @@ const AIChatbot = () => {
3937

4038
return (
4139
<>
42-
{/* Botón Avatar con entrada desde el Hiperespacio */}
40+
{/* Botón Avatar */}
4341
<motion.button
4442
initial={{ scale: 0, rotate: -180, filter: "blur(20px)" }}
4543
animate={{ scale: 1, rotate: 0, filter: "blur(0px)" }}
@@ -71,17 +69,17 @@ const AIChatbot = () => {
7169
)}
7270
</AnimatePresence>
7371

74-
{/* Interfaz de Chat Adaptable (Móvil/Tablet/PC) */}
72+
{/* Chat Window - Enlarged with Open Full button */}
7573
<AnimatePresence>
7674
{isOpen && (
7775
<motion.div
7876
initial={{ opacity: 0, scale: 0, x: 150, y: 150, filter: "blur(20px)" }}
7977
animate={{ opacity: 1, scale: 1, x: 0, y: 0, filter: "blur(0px)" }}
8078
exit={{ opacity: 0, scale: 0, x: 150, y: 150, filter: "blur(20px)" }}
8179
transition={{ duration: 0.5, ease: "circOut" }}
82-
className="fixed z-[9999] bottom-6 right-6 left-6 sm:left-auto sm:w-[380px] md:w-[420px] h-[75vh] max-h-[600px] bg-alien-space-dark rounded-[2.5rem] border-2 border-alien-gold/30 shadow-[0_0_80px_rgba(0,0,0,0.9)] overflow-hidden flex flex-col"
80+
className="fixed z-[9999] bottom-6 right-6 left-6 sm:left-auto sm:w-[420px] md:w-[480px] h-[80vh] max-h-[700px] bg-alien-space-dark rounded-[2.5rem] border-2 border-alien-gold/30 shadow-[0_0_80px_rgba(0,0,0,0.9)] overflow-hidden flex flex-col"
8381
>
84-
{/* Header Interface */}
82+
{/* Header with Open Full button */}
8583
<div className="p-5 bg-black/60 border-b border-white/10 flex justify-between items-center">
8684
<div className="flex items-center gap-3">
8785
<div className="w-9 h-9 rounded-full border border-alien-green/50 p-0.5">
@@ -92,12 +90,23 @@ const AIChatbot = () => {
9290
<span className="text-alien-green text-[8px] font-exo uppercase animate-pulse">Online • Quantum Link</span>
9391
</div>
9492
</div>
95-
<button onClick={() => setIsOpen(false)} className="p-2 hover:bg-white/10 rounded-full text-white/50 hover:text-alien-green transition-all">
96-
<X size={22} />
97-
</button>
93+
<div className="flex items-center gap-1">
94+
<a
95+
href="https://aitor.lovable.app/"
96+
target="_blank"
97+
rel="noopener noreferrer"
98+
className="p-2 hover:bg-white/10 rounded-full text-white/50 hover:text-alien-green transition-all"
99+
title="Open Full AI Tor"
100+
>
101+
<ExternalLink size={18} />
102+
</a>
103+
<button onClick={() => setIsOpen(false)} className="p-2 hover:bg-white/10 rounded-full text-white/50 hover:text-alien-green transition-all">
104+
<X size={22} />
105+
</button>
106+
</div>
98107
</div>
99108

100-
{/* Iframe & Radar de Carga */}
109+
{/* Iframe */}
101110
<div className="flex-1 bg-black relative">
102111
{isLoading && (
103112
<div className="absolute inset-0 flex flex-col items-center justify-center bg-alien-space-dark z-10">

src/components/Header/ConnectButton.tsx

Lines changed: 19 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React from 'react';
22
import { Button } from '@/components/ui/button';
33
import { useAppKit } from '@reown/appkit/react';
4-
import { Brain, Copy, CheckCircle } from 'lucide-react';
4+
import { Copy, CheckCircle } from 'lucide-react';
55
import { useWalletConnection } from '@/hooks/useWalletConnection';
6-
import { regenerateAIKey } from '@/utils/aiKeyGenerator';
76
import { toast } from 'sonner';
87

98
const WALLET_ICON = "/lovable-uploads/AW.png";
@@ -16,75 +15,45 @@ const shortAddress = (addr: string) =>
1615

1716
const ConnectButton = () => {
1817
const { open } = useAppKit();
19-
const { address, isConnected, aiKey, isLoadingKey } = useWalletConnection();
18+
const { address, isConnected, aiKey } = useWalletConnection();
2019
const [copied, setCopied] = React.useState(false);
21-
const [showAIKey, setShowAIKey] = React.useState(false);
2220

2321
const copyAIKey = () => {
2422
if (aiKey) {
2523
navigator.clipboard.writeText(aiKey);
2624
setCopied(true);
27-
toast.success('AI Key Copied!', {
28-
description: 'Your AI key has been copied to clipboard.'
29-
});
25+
toast.success('AI Key Copied!');
3026
setTimeout(() => setCopied(false), 2000);
3127
}
3228
};
3329

34-
const handleRegenerateKey = () => {
35-
if (address) {
36-
const newKey = regenerateAIKey(address);
37-
toast.success('AI Key Regenerated!', {
38-
description: 'A new AI key has been generated for your wallet.'
39-
});
40-
}
41-
};
42-
4330
return (
44-
<div className="flex flex-wrap items-center gap-3">
31+
<div className="flex items-center gap-3">
4532
{isConnected && address ? (
4633
<>
47-
<div className="flex flex-col gap-2">
34+
{/* Connected state: address + optional AI key copy + manage */}
35+
<div className="flex items-center gap-2">
4836
<span
49-
className="
50-
text-alien-gold font-mono text-xs sm:text-sm bg-alien-green px-3 py-1 rounded-full
51-
border border-alien-gold shadow transition-all duration-200 select-all
52-
"
37+
className="text-alien-gold font-mono text-xs bg-alien-green/20 px-3 py-1.5 rounded-full border border-alien-gold/30 shadow-sm select-all"
5338
title={address}
5439
>
5540
{shortAddress(address)}
5641
</span>
42+
{/* Inline AI key copy button */}
5743
{aiKey && (
5844
<button
59-
onClick={() => setShowAIKey(!showAIKey)}
60-
className="text-xs text-alien-gold hover:text-alien-gold-light transition-colors"
45+
onClick={copyAIKey}
46+
className="p-1.5 rounded-full bg-alien-gold/10 hover:bg-alien-gold/20 border border-alien-gold/20 text-alien-gold hover:text-alien-green transition-all duration-300"
47+
title="Copy AI Key"
6148
>
62-
{showAIKey ? 'Hide AI Key' : 'Show AI Key'}
49+
{copied ? <CheckCircle className="h-3.5 w-3.5" /> : <Copy className="h-3.5 w-3.5" />}
6350
</button>
6451
)}
6552
</div>
66-
67-
{showAIKey && aiKey && (
68-
<div className="flex items-center gap-2 bg-alien-space-dark/80 p-2 rounded-lg border border-alien-gold/30">
69-
<span className="text-xs text-gray-300 font-mono">{aiKey.substring(0, 16)}...</span>
70-
<Button
71-
size="sm"
72-
onClick={copyAIKey}
73-
className="bg-alien-gold/20 hover:bg-alien-gold/30 p-1 h-6"
74-
>
75-
{copied ? <CheckCircle className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
76-
</Button>
77-
</div>
78-
)}
7953

8054
<Button
8155
onClick={() => open({ view: "Account" })}
82-
className="
83-
bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full
84-
flex items-center justify-center p-2 sm:p-3
85-
transition-all duration-200 ease-in-out
86-
hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold
87-
"
56+
className="bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full flex items-center justify-center p-2 sm:p-3 transition-all duration-300 hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold"
8857
title="Manage Wallet"
8958
aria-label="Manage Wallet"
9059
type="button"
@@ -97,23 +66,13 @@ const ConnectButton = () => {
9766
</>
9867
) : (
9968
<Button
100-
className="
101-
bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full
102-
flex items-center justify-center p-2 sm:p-3
103-
transition-all duration-200 ease-in-out
104-
hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold
105-
"
69+
className="bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full flex items-center justify-center p-2 sm:p-3 transition-all duration-300 hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold"
10670
onClick={() => open({ view: "Connect" })}
107-
title="Conectar Wallet"
108-
aria-label="Conectar Wallet"
71+
title="Connect Wallet"
72+
aria-label="Connect Wallet"
10973
type="button"
11074
>
111-
<img
112-
src={WALLET_ICON}
113-
alt="Wallet Logo"
114-
className={`${ICON_SIZE} rounded-full object-cover`}
115-
draggable={false}
116-
/>
75+
<img src={WALLET_ICON} alt="Wallet Logo" className={`${ICON_SIZE} rounded-full object-cover`} draggable={false} />
11776
</Button>
11877
)}
11978
<a
@@ -126,22 +85,12 @@ const ConnectButton = () => {
12685
tabIndex={-1}
12786
>
12887
<Button
129-
className="
130-
bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full
131-
flex items-center justify-center p-2 sm:p-3
132-
transition-all duration-200 ease-in-out
133-
hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold
134-
"
88+
className="bg-alien-green hover:bg-alien-green-light text-alien-gold rounded-full flex items-center justify-center p-2 sm:p-3 transition-all duration-300 hover:shadow-lg hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-alien-gold"
13589
type="button"
13690
>
13791
<picture>
13892
<source srcSet={PORTAL_ICON_AVIF} type="image/avif" />
139-
<img
140-
src={PORTAL_ICON_JPG}
141-
alt="Portal Icon"
142-
className={`${ICON_SIZE} rounded-full object-cover`}
143-
draggable={false}
144-
/>
93+
<img src={PORTAL_ICON_JPG} alt="Portal Icon" className={`${ICON_SIZE} rounded-full object-cover`} draggable={false} />
14594
</picture>
14695
</Button>
14796
</a>

0 commit comments

Comments
 (0)