feat: Placeholder farbig markieren in Freigabe-View und Pair-Modal

Objekt-Placeholder indigo, Wort-Placeholder grün, geleakte ⟦PHn⟧-Tokens rot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 22:43:46 +02:00
parent 96c436e0e9
commit e78be430c7
4 changed files with 56 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ import { useEffect, useState, useRef, useCallback } from 'react';
import Layout from '../components/Layout';
import { apiFetch, apiPost } from '../lib/api';
import { buildRows } from '../lib/pairRows';
import PlaceholderText from '../components/PlaceholderText';
const LANGS = [
{ code: 'de', flag: '🇩🇪' },
@@ -124,7 +125,7 @@ function PairRow({ pair, flagged, onToggleFlag, objIndexById, onAssign, assignin
const isQuestion = row.label === 'Frage';
return (
<div key={row.label} className={`${row.color} ${isQuestion ? 'italic' : ''} break-words`}>
{val || <span className="text-red-400 italic not-italic"> {row.label} fehlt </span>}
{val ? <PlaceholderText text={val} /> : <span className="text-red-400 italic not-italic"> {row.label} fehlt </span>}
</div>
);
})}