feat: Content Verwaltung — ContentHub + Object Creation

Adds a full Content Management section:
- Nav link "Content" in header (all pages)
- ContentHub at /content with 3 tiles (Object/Statement/Content Creation)
- ObjectCreation at /content/objects:
  - Top bar: ← → pagination through all "uploaded" pictures
  - Left panel (1/5): existing objects per picture with their words, + button to start draw mode
  - Center: image on dark bg with canvas overlay for polygon drawing
  - Right words panel (1/5): picture words + new object words (each with search/create)
  - Right toolbar (1/5): draw instructions, "Auswahl hinzufügen", numbered selections list, "Objekt speichern" (requires ≥1 selection + ≥1 object word)
- Canvas drawing: click=add point, dblclick=close polygon, live preview line to mouse cursor
- Selections stored as [{points:[{x,y},...]}] (relative 0-1 coords) in objects.selections JSONB
- Object saved with status "draft", linked picture + words

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 21:53:23 +02:00
parent 6c8eaab034
commit e1d5390386
4 changed files with 774 additions and 4 deletions

View File

@@ -4,6 +4,8 @@ import Login from './pages/Login';
import Dashboard from './pages/Dashboard';
import DatabaseAdmin from './pages/DatabaseAdmin';
import TableView from './pages/TableView';
import ContentHub from './pages/ContentHub';
import ObjectCreation from './pages/ObjectCreation';
function RequireAuth({ children }) {
const user = getUser();
@@ -19,6 +21,8 @@ export default function App() {
<Route path="/" element={<RequireAuth><Dashboard /></RequireAuth>} />
<Route path="/db" element={<RequireAuth><DatabaseAdmin /></RequireAuth>} />
<Route path="/db/:tableKey" element={<RequireAuth><TableView /></RequireAuth>} />
<Route path="/content" element={<RequireAuth><ContentHub /></RequireAuth>} />
<Route path="/content/objects" element={<RequireAuth><ObjectCreation /></RequireAuth>} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
</BrowserRouter>