|
1 | | -import React, { useState } from 'react'; |
2 | | -import { LaunchAnimation } from './components/LaunchAnimation'; |
3 | | -import { ConnectServer } from './components/ConnectServer'; |
4 | | -import { Sidebar } from './components/Sidebar'; |
5 | | -import { StrategyBuilder } from './pages/StrategyBuilder'; |
6 | | -import { Integrations } from './pages/Integrations'; |
7 | | -import { Backtests } from './pages/Backtests'; |
8 | | -import { Settings } from './pages/Settings'; |
| 1 | +import React from 'react'; |
9 | 2 |
|
10 | 3 | export const App = () => { |
11 | | - const [stage, setStage] = useState<'launch' | 'connect' | 'dashboard'>('launch'); |
12 | | - const [currentView, setCurrentView] = useState(() => { |
13 | | - const path = window.location.pathname; |
14 | | - if (path.includes('strategy')) return 'strategy'; |
15 | | - if (path.includes('integrations')) return 'integrations'; |
16 | | - if (path.includes('backtests')) return 'backtests'; |
17 | | - return 'dashboard'; |
18 | | - }); |
19 | | - |
20 | | - const handleAnimationComplete = () => { |
21 | | - setStage('connect'); |
22 | | - }; |
23 | | - |
24 | | - const handleConnect = () => { |
25 | | - setStage('dashboard'); |
26 | | - }; |
27 | | - |
28 | | - if (stage === 'launch') { |
29 | | - return <LaunchAnimation onComplete={handleAnimationComplete} />; |
30 | | - } |
31 | | - |
32 | | - if (stage === 'connect') { |
33 | | - return <ConnectServer onConnect={handleConnect} />; |
34 | | - } |
35 | | - |
36 | | - const renderContent = () => { |
37 | | - switch (currentView) { |
38 | | - case 'strategy': |
39 | | - return <StrategyBuilder />; |
40 | | - case 'integrations': |
41 | | - return <Integrations />; |
42 | | - case 'backtests': |
43 | | - return <Backtests />; |
44 | | - case 'settings': |
45 | | - return <Settings />; |
46 | | - case 'dashboard': |
47 | | - default: |
48 | | - return ( |
49 | | - <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
50 | | - {/* Placeholder cards */} |
51 | | - <div className="p-6 rounded-xl bg-card border border-border/50 hover:border-primary/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(255,0,255,0.1)] group cursor-pointer"> |
52 | | - <h3 className="text-xl font-bold mb-2 group-hover:text-primary transition-colors">Market Data</h3> |
53 | | - <p className="text-muted-foreground tezt-sm">Live stream active. Latency: 12ms.</p> |
54 | | - <div className="mt-4 h-32 bg-background/50 rounded-lg flex items-center justify-center border border-dashed border-muted"> |
55 | | - <span className="text-xs text-muted-foreground">CHART PLACEHOLDER</span> |
56 | | - </div> |
57 | | - </div> |
58 | | - |
59 | | - <div className="p-6 rounded-xl bg-card border border-border/50 hover:border-secondary/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(0,255,255,0.1)] group cursor-pointer"> |
60 | | - <h3 className="text-xl font-bold mb-2 group-hover:text-secondary transition-colors">Strategies</h3> |
61 | | - <p className="text-muted-foreground text-sm">3 Active strategies. PnL +2.4%</p> |
62 | | - <div className="mt-4 flex gap-2"> |
63 | | - <div className="px-3 py-1 rounded-full bg-secondary/10 text-secondary text-xs border border-secondary/20">Alpha</div> |
64 | | - <div className="px-3 py-1 rounded-full bg-primary/10 text-primary text-xs border border-primary/20">Gamma</div> |
65 | | - </div> |
66 | | - </div> |
67 | | - |
68 | | - <div className="p-6 rounded-xl bg-card border border-border/50 hover:border-accent/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(57,255,20,0.1)] group cursor-pointer"> |
69 | | - <h3 className="text-xl font-bold mb-2 group-hover:text-accent transition-colors">System Health</h3> |
70 | | - <p className="text-muted-foreground text-sm">All services operational.</p> |
71 | | - <div className="mt-4 space-y-2"> |
72 | | - <div className="flex justify-between text-xs"><span>CPU</span><span className="text-accent">12%</span></div> |
73 | | - <div className="w-full h-1 bg-muted rounded-full overflow-hidden"><div className="w-[12%] h-full bg-accent"></div></div> |
74 | | - <div className="flex justify-between text-xs"><span>MEM</span><span className="text-accent">45%</span></div> |
75 | | - <div className="w-full h-1 bg-muted rounded-full overflow-hidden"><div className="w-[45%] h-full bg-accent"></div></div> |
76 | | - </div> |
77 | | - </div> |
78 | | - </div> |
79 | | - ); |
80 | | - } |
81 | | - }; |
82 | | - |
83 | | - // Dashboard / Logged In State |
84 | 4 | return ( |
85 | | - <div className="flex h-screen bg-background text-foreground overflow-hidden fade-in"> |
86 | | - <Sidebar currentView={currentView} onNavigate={setCurrentView} /> |
87 | | - |
88 | | - <div className="flex-1 flex flex-col min-w-0 overflow-auto"> |
89 | | - <header className="flex justify-between items-center p-8 pb-4"> |
90 | | - <h1 className="text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r from-primary to-secondary drop-shadow-[0_0_15px_rgba(255,0,255,0.3)]"> |
91 | | - QuanuX |
92 | | - </h1> |
93 | | - <div className="flex items-center gap-4"> |
94 | | - <div className="w-3 h-3 rounded-full bg-green-500 shadow-[0_0_10px_#00ff00] animate-pulse"></div> |
95 | | - <span className="text-sm font-mono text-muted-foreground">SYSTEM ONLINE</span> |
96 | | - </div> |
97 | | - </header> |
98 | | - |
99 | | - <main className="flex-1 p-8 pt-0 h-full overflow-hidden"> |
100 | | - {renderContent()} |
101 | | - </main> |
| 5 | + <div className="flex h-screen w-screen items-center justify-center bg-background text-foreground font-mono"> |
| 6 | + <div className="text-center space-y-4"> |
| 7 | + <h1 className="text-3xl font-bold tracking-widest uppercase">QuanuX</h1> |
| 8 | + <p className="text-sm text-muted-foreground">Tauri Desktop Shell initialized. Awaiting UI configuration.</p> |
102 | 9 | </div> |
103 | 10 | </div> |
104 | 11 | ); |
|
0 commit comments