feat(web): 新增 Landing 页面与 UI 优化\n\n- 新增 LandingPage、CryptoFeatureCard 等组件\n- 登录/注册页面与样式优化\n- 静态资源 images/main.png

This commit is contained in:
Ember
2025-11-01 23:36:28 +08:00
parent 775446d939
commit 9d4e86cbf5
10 changed files with 1435 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import { AITradersPage } from './components/AITradersPage';
import { LoginPage } from './components/LoginPage';
import { RegisterPage } from './components/RegisterPage';
import { CompetitionPage } from './components/CompetitionPage';
import { LandingPage } from './components/LandingPage';
import AILearning from './components/AILearning';
import { LanguageProvider, useLanguage } from './contexts/LanguageContext';
import { AuthProvider, useAuth } from './contexts/AuthContext';
@@ -179,12 +180,16 @@ function App() {
);
}
// If not in admin mode and not authenticated, show login/register pages
// Show landing page for root route when not authenticated
if (!systemConfig?.admin_mode && (!user || !token)) {
if (route === '/login') {
return <LoginPage />;
}
if (route === '/register') {
return <RegisterPage />;
}
return <LoginPage />;
// Default to landing page when not authenticated
return <LandingPage />;
}
return (