Fix bugs, convert thumbnail to png, add context menu
This commit is contained in:
parent
c545d4b17d
commit
eb8a302222
37 changed files with 1916 additions and 137 deletions
|
|
@ -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>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue