Fix bugs, convert thumbnail to png, add context menu
Some checks failed
Automated Container Build / build-and-push (push) Failing after 2s
CI / Backend (Python) (push) Failing after 9s
CI / Frontend (TypeScript) (push) Failing after 4m46s

This commit is contained in:
Elijah 2026-06-10 19:06:28 -07:00
parent c545d4b17d
commit eb8a302222
37 changed files with 1916 additions and 137 deletions

View file

@ -1,22 +1,36 @@
import { Routes, Route, Navigate } from 'react-router-dom'
import { LoginPage } from '../pages/LoginPage'
import { SetupPage } from '../pages/SetupPage'
import { HomePage } from '../pages/HomePage'
import { EditorPage } from '../pages/EditorPage'
import { AuthGuard } from '../features/auth/AuthGuard'
/**
* Root application component with route definitions.
*
* Routes:
* - /login — password entry / first-run setup
* - / home page (recently edited, library, trash)
* - /editor/:id PDF editor workspace
*/
export function App() {
return (
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route path="/" element={<HomePage />} />
<Route path="/editor/:id" element={<EditorPage />} />
<Route path="/login" element={
<AuthGuard>
<LoginPage />
</AuthGuard>
} />
<Route path="/setup" element={
<AuthGuard>
<SetupPage />
</AuthGuard>
} />
{/* Protected Routes */}
<Route path="/" element={
<AuthGuard>
<HomePage />
</AuthGuard>
} />
<Route path="/editor/:id" element={
<AuthGuard>
<EditorPage />
</AuthGuard>
} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
)