@ -143,6 +143,11 @@ export function AudioInputNode({ id, data, selected }: NodeProps<AudioInputNodeT
{ nodeData . audioFile ? (
{ nodeData . audioFile ? (
< div className = "relative group flex-1 flex flex-col min-h-0 gap-2" >
< div className = "relative group flex-1 flex flex-col min-h-0 gap-2" >
{ nodeData . isOptional && (
< span className = "absolute top-1 left-1 z-10 text-[9px] font-medium text-neutral-300 bg-black/50 px-1.5 py-0.5 rounded" >
Optional
< / span >
) }
{ /* Filename and duration */ }
{ /* Filename and duration */ }
< div className = "flex items-center justify-between shrink-0" >
< div className = "flex items-center justify-between shrink-0" >
< span className = "text-[10px] text-neutral-400 truncate max-w-[150px]" title = { nodeData . filename || "" } >
< span className = "text-[10px] text-neutral-400 truncate max-w-[150px]" title = { nodeData . filename || "" } >
@ -223,13 +228,13 @@ export function AudioInputNode({ id, data, selected }: NodeProps<AudioInputNodeT
onClick = { ( ) = > fileInputRef . current ? . click ( ) }
onClick = { ( ) = > fileInputRef . current ? . click ( ) }
onDrop = { handleDrop }
onDrop = { handleDrop }
onDragOver = { handleDragOver }
onDragOver = { handleDragOver }
className = " w-full h-full bg-neutral-900/40 flex flex-col items-center justify-center cursor-pointer hover:bg-neutral-800/60 transition-colors"
className = { ` w-full h-full bg-neutral-900/40 flex flex-col items-center justify-center cursor-pointer hover:bg-neutral-800/60 transition-colors ${ nodeData . isOptional ? "border-2 border-dashed border-neutral-600" : "" } ` }
>
>
< svg className = "w-8 h-8 text-neutral-600" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" strokeWidth = { 1.5 } >
< svg className = "w-8 h-8 text-neutral-600" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" strokeWidth = { 1.5 } >
< path strokeLinecap = "round" strokeLinejoin = "round" d = "M9 9l10.5-3m0 6.553v3.75a2.25 2.25 0 01-1.632 2.163l-1.32.377a1.803 1.803 0 11-.99-3.467l2.31-.66a2.25 2.25 0 001.632-2.163zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 01-1.632 2.163l-1.32.377a1.803 1.803 0 01-.99-3.467l2.31-.66A2.25 2.25 0 009 15.553z" / >
< path strokeLinecap = "round" strokeLinejoin = "round" d = "M9 9l10.5-3m0 6.553v3.75a2.25 2.25 0 01-1.632 2.163l-1.32.377a1.803 1.803 0 11-.99-3.467l2.31-.66a2.25 2.25 0 001.632-2.163zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 01-1.632 2.163l-1.32.377a1.803 1.803 0 01-.99-3.467l2.31-.66A2.25 2.25 0 009 15.553z" / >
< / svg >
< / svg >
< span className = "text-xs text-neutral-500 mt-2" >
< span className = "text-xs text-neutral-500 mt-2" >
Drop audio or click
{ nodeData . isOptional ? "Optional" : "Drop audio or click" }
< / span >
< / span >
< / div >
< / div >
) }
) }