diff --git a/web/src/App.tsx b/web/src/App.tsx index d598044..997879c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -376,6 +376,29 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { err } } +// Inline-Komponente für Umbenennen (nur bei genau 1 Selektion sichtbar) +type RenameInlineProps = { onSubmit: (newName: string) => void | Promise }; +function RenameInline({ onSubmit }: RenameInlineProps) { + const [val, setVal] = useState(''); + async function submit() { + const n = val.trim(); + if (!n) return; + await onSubmit(n); + setVal(''); + } + return ( +
+ setVal(e.target.value)} + placeholder="Neuer Name" + onKeyDown={(e) => { if (e.key === 'Enter') void submit(); }} + /> + +
+ ); +} +