Import Tripoli Cloud frontend prototype
React/TypeScript/Vite/Tailwind prototype from the design session (login, dashboard, photos, backups, settings views with mocked API layer). Infra work (Rust services, Ansible, OpenTofu) follows in subsequent commits. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
commit
5dbd3b96f6
73 changed files with 4789 additions and 0 deletions
49
app/src/App.tsx
Normal file
49
app/src/App.tsx
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import { AuthLayout } from './components/auth/AuthLayout';
|
||||
import { AppShell } from './components/layout/AppShell';
|
||||
import { BackupsView } from './components/backups/BackupsView';
|
||||
import { DashboardView } from './components/dashboard/DashboardView';
|
||||
import { PhotosView } from './components/photos/PhotosView';
|
||||
import { SettingsView } from './components/settings/SettingsView';
|
||||
import { NavigationProvider, useNavigation } from './contexts/NavigationContext';
|
||||
import { SessionProvider, useSession } from './contexts/SessionContext';
|
||||
import { ThemeProvider } from './contexts/ThemeContext';
|
||||
|
||||
/** Content router — a plain state switch (NavigationContext.nav), no react-router. */
|
||||
function AppContent() {
|
||||
const { nav } = useNavigation();
|
||||
|
||||
switch (nav) {
|
||||
case 'dashboard':
|
||||
return <DashboardView />;
|
||||
case 'photos':
|
||||
return <PhotosView />;
|
||||
case 'backups':
|
||||
return <BackupsView />;
|
||||
case 'settings':
|
||||
return <SettingsView />;
|
||||
}
|
||||
}
|
||||
|
||||
function Root() {
|
||||
const { view } = useSession();
|
||||
|
||||
if (view === 'auth') return <AuthLayout />;
|
||||
|
||||
return (
|
||||
<NavigationProvider>
|
||||
<AppShell>
|
||||
<AppContent />
|
||||
</AppShell>
|
||||
</NavigationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<SessionProvider>
|
||||
<Root />
|
||||
</SessionProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue