Commit Graph

4 Commits

Author SHA1 Message Date
8242dab18c feat: unified ContentCreation tool (Object + Statement creation merged)
- New ContentCreation.jsx: 3-column layout
  Left: object list + "+ Objekt hinzufügen" button
  Center: dual-mode canvas (draw OR highlight)
  Right: ObjectAddPanel (mode=add) or PairsPanel (mode=objectId)
- After saving object → auto-switches to PairsPanel for that object
- All ObjectCreation + StatementCreation logic merged into one page
- All pictures loaded (no objects_created filter)
- "Objekte abgeschlossen" button marks picture (visual badge)
- ContentHub: 2 tiles (Content Erstellen + Veröffentlichen placeholder)
- App.jsx: /content/creation route, old /content/objects + /content/statements removed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 17:28:16 +02:00
c92191db63 feat: Statement Creation + objects_created workflow + native language
ObjectCreation:
- Filter: only shows pictures where objects_created=false
- New '✓ Alle Objekte erstellt' button (enabled when ≥1 object linked)
  → PATCHes picture with objects_created:true + auto timestamp
  → removes picture from list immediately

ContentHub:
- Statement Creation tile enabled (was: grayed out)

api.js:
- getUserLang() → reads native_lang from stored user (default 'de')
- langField(suffix) → returns e.g. 'sentence_de' based on user lang
- login() stores native_lang in localStorage user object

StatementCreation (/content/statements):
- Shows pictures where objects_created=true
- Left 1/5: clickable objects list → highlights selections on canvas
- Center 2/5: image with canvas, draws selected object's polygons in color
- Right 2/5: PairsPanel
  - answer_type dropdown + 'Add new pair' toggle
  - PairForm: Question / Positive / Negative textareas
  - HighlightedTextarea: overlay technique, auto-detects words from DB
    (debounced GET /words?titel_de=, colored mark via rgba background)
  - 'Als Wort erstellen' button when text is selected
  - 'Save pair' → creates question + 2 separate statements + pair
    → sentences stored with {{uuid}} placeholders for matched words
    → pair linked to selected object
  - List of existing pairs with question/positive/negative preview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 19:23:50 +02:00
e1d5390386 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>
2026-05-23 21:53:23 +02:00
74082cd333 Initial commit: snakkimo CMT
React + Vite + Tailwind dashboard with:
- Login (JWT via snakkimo auth)
- Dashboard with Datenbankverwaltung + Contentverwaltung tiles
- Table overview with record counts (total, published, blocked)
- Table record viewer with text/status filters and linked field navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 21:29:12 +02:00