feat: enhance asset browser panel with improved asset selection and loading states

- Added state management for asset selection to prevent multiple simultaneous selections.
- Implemented request sequence tracking to ensure accurate loading state handling during asset searches.
- Enhanced error handling and user feedback for asset loading failures.
- Updated UI elements to improve accessibility and user experience during asset browsing.
This commit is contained in:
Matthias
2026-03-27 21:26:29 +01:00
parent bc3bbf9d69
commit 8e4e2fcac1
9 changed files with 278 additions and 155 deletions

View File

@@ -87,7 +87,7 @@ export default function TextNode({ id, data, selected }: NodeProps<TextNode>) {
className="!h-3 !w-3 !bg-primary !border-2 !border-background"
/>
<div className="w-64 p-3">
<div className="w-full p-3">
<div className="text-xs font-medium text-muted-foreground mb-1">
📝 Text
</div>
@@ -97,14 +97,14 @@ export default function TextNode({ id, data, selected }: NodeProps<TextNode>) {
onChange={handleChange}
onBlur={() => setIsEditing(false)}
autoFocus
className="nodrag nowheel w-full resize-none rounded-md border-0 bg-transparent p-0 text-sm outline-none focus:ring-0 min-h-[3rem]"
className="nodrag nowheel w-full resize-none rounded-md border-0 bg-transparent p-0 text-sm outline-none focus:ring-0 min-h-[3rem] overflow-hidden"
placeholder="Text eingeben…"
rows={3}
/>
) : (
<div
onDoubleClick={() => setIsEditing(true)}
className="min-h-[2rem] cursor-text text-sm whitespace-pre-wrap"
className="min-h-[2rem] cursor-text text-sm whitespace-pre-wrap overflow-wrap-break-word"
>
{content || (
<span className="text-muted-foreground">