mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-12 03:36:59 +00:00
e0319b5dae
Replace plain Card-based Login and Setup forms with a professional split-panel layout: always-dark branding panel (dot grid texture, logo, tagline, cyan accent line) on the left, theme-aware form on the right. Mobile collapses to single column with compact logo header. - Add optional admin email field on Setup for license recovery - Backend accepts and stores admin_email in setup endpoint - Fix data-stacks-loaded attribute forwarding (wrap in div, use string values)
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { AuthProvider, useAuth } from './context/AuthContext';
|
|
import { NodeProvider } from './context/NodeContext';
|
|
import { LicenseProvider } from './context/LicenseContext';
|
|
import { Login } from './components/Login';
|
|
import { Setup } from './components/Setup';
|
|
import EditorLayout from './components/EditorLayout';
|
|
|
|
function AppContent() {
|
|
const { appStatus, isAuthenticated, needsSetup, completeSetup } = useAuth();
|
|
|
|
if (appStatus === 'loading') {
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-background">
|
|
<div className="text-muted-foreground">Loading...</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
if (needsSetup) {
|
|
return <Setup onComplete={completeSetup} />;
|
|
}
|
|
|
|
if (!isAuthenticated) {
|
|
return <Login />;
|
|
}
|
|
|
|
return (
|
|
<NodeProvider>
|
|
<LicenseProvider>
|
|
<EditorLayout />
|
|
</LicenseProvider>
|
|
</NodeProvider>
|
|
);
|
|
}
|
|
|
|
import { Toaster } from 'sonner';
|
|
|
|
function App() {
|
|
return (
|
|
<AuthProvider>
|
|
<AppContent />
|
|
<Toaster position="bottom-right" richColors />
|
|
</AuthProvider>
|
|
);
|
|
}
|
|
|
|
export default App;
|