- Implemented Settings page for changing user passwords with validation and feedback. - Created Setup page for initial admin account setup with form handling and navigation. - Added API service layer for handling requests related to proxy hosts, remote servers, and import functionality. - Introduced mock data for testing purposes and set up testing framework with vitest. - Configured Tailwind CSS for styling and Vite for development and build processes. - Added scripts for Dockerfile validation, Python syntax checking, and Sourcery integration. - Implemented release and coverage scripts for better CI/CD practices.
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
import { BrowserRouter as Router, Routes, Route, Outlet } from 'react-router-dom'
|
|
import Layout from './components/Layout'
|
|
import { ToastContainer } from './components/Toast'
|
|
import { SetupGuard } from './components/SetupGuard'
|
|
import RequireAuth from './components/RequireAuth'
|
|
import { AuthProvider } from './context/AuthContext'
|
|
import Dashboard from './pages/Dashboard'
|
|
import ProxyHosts from './pages/ProxyHosts'
|
|
import RemoteServers from './pages/RemoteServers'
|
|
import ImportCaddy from './pages/ImportCaddy'
|
|
import Certificates from './pages/Certificates'
|
|
import Settings from './pages/Settings'
|
|
import Login from './pages/Login'
|
|
import Setup from './pages/Setup'
|
|
|
|
export default function App() {
|
|
return (
|
|
<AuthProvider>
|
|
<Router>
|
|
<Routes>
|
|
<Route path="/login" element={<Login />} />
|
|
<Route path="/setup" element={<Setup />} />
|
|
<Route path="/" element={
|
|
<SetupGuard>
|
|
<RequireAuth>
|
|
<Layout>
|
|
<Outlet />
|
|
</Layout>
|
|
</RequireAuth>
|
|
</SetupGuard>
|
|
}>
|
|
<Route index element={<Dashboard />} />
|
|
<Route path="proxy-hosts" element={<ProxyHosts />} />
|
|
<Route path="remote-servers" element={<RemoteServers />} />
|
|
<Route path="certificates" element={<Certificates />} />
|
|
<Route path="import" element={<ImportCaddy />} />
|
|
<Route path="settings" element={<Settings />} />
|
|
</Route>
|
|
</Routes>
|
|
<ToastContainer />
|
|
</Router>
|
|
</AuthProvider>
|
|
)
|
|
}
|