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>
This commit is contained in:
@@ -6,6 +6,7 @@ import DatabaseAdmin from './pages/DatabaseAdmin';
|
||||
import TableView from './pages/TableView';
|
||||
import ContentHub from './pages/ContentHub';
|
||||
import ObjectCreation from './pages/ObjectCreation';
|
||||
import StatementCreation from './pages/StatementCreation';
|
||||
|
||||
function RequireAuth({ children }) {
|
||||
const user = getUser();
|
||||
@@ -23,6 +24,7 @@ export default function App() {
|
||||
<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="/content/statements" element={<RequireAuth><StatementCreation /></RequireAuth>} />
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
Reference in New Issue
Block a user