|
|
|
@ -309,6 +309,7 @@ export function VideoInputNodeView({ id, data, selected }: VideoInputNodeViewPro |
|
|
|
|
|
|
|
const title = getVideoNodeTitle(id, nodeData, t("node.videoInput")); |
|
|
|
const hasVideoAsset = Boolean(nodeData.video || nodeData.previewVideoPoster); |
|
|
|
const mediaActionVisibility = selected ? "opacity-100" : "opacity-0 group-hover:opacity-100"; |
|
|
|
|
|
|
|
return ( |
|
|
|
<BaseNode |
|
|
|
@ -402,7 +403,7 @@ export function VideoInputNodeView({ id, data, selected }: VideoInputNodeViewPro |
|
|
|
handleOpenFileDialog(); |
|
|
|
}} |
|
|
|
aria-label={t("videoInput.upload")} |
|
|
|
className="absolute top-2 right-[4.5rem] w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs opacity-0 group-hover:opacity-100 focus:opacity-100 transition-all flex items-center justify-center" |
|
|
|
className={`absolute top-2 right-[4.5rem] w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs focus:opacity-100 transition-all flex items-center justify-center ${mediaActionVisibility}`} |
|
|
|
> |
|
|
|
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}> |
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M12 3v12m0-12 4.5 4.5M12 3 7.5 7.5M3 15v3a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3v-3" /> |
|
|
|
@ -414,7 +415,7 @@ export function VideoInputNodeView({ id, data, selected }: VideoInputNodeViewPro |
|
|
|
setIsAssetPickerOpen(true); |
|
|
|
}} |
|
|
|
aria-label={t("imageInput.fromAssets")} |
|
|
|
className="absolute top-2 right-[6.75rem] w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs opacity-0 group-hover:opacity-100 focus:opacity-100 transition-all flex items-center justify-center" |
|
|
|
className={`absolute top-2 right-[6.75rem] w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs focus:opacity-100 transition-all flex items-center justify-center ${mediaActionVisibility}`} |
|
|
|
> |
|
|
|
<AssetIcon className="w-3.5 h-3.5" /> |
|
|
|
</button> |
|
|
|
@ -424,7 +425,7 @@ export function VideoInputNodeView({ id, data, selected }: VideoInputNodeViewPro |
|
|
|
downloadMedia(nodeData.video!, "video"); |
|
|
|
}} |
|
|
|
aria-label={t("videoInput.download")} |
|
|
|
className="absolute top-2 right-10 w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs opacity-0 group-hover:opacity-100 focus:opacity-100 transition-all flex items-center justify-center" |
|
|
|
className={`absolute top-2 right-10 w-6 h-6 bg-black/60 hover:bg-black/80 text-white rounded text-xs focus:opacity-100 transition-all flex items-center justify-center ${mediaActionVisibility}`} |
|
|
|
> |
|
|
|
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}> |
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /> |
|
|
|
@ -436,7 +437,7 @@ export function VideoInputNodeView({ id, data, selected }: VideoInputNodeViewPro |
|
|
|
handleRemove(); |
|
|
|
}} |
|
|
|
aria-label={t("videoInput.remove")} |
|
|
|
className="absolute top-2 right-2 w-6 h-6 bg-black/60 hover:bg-red-600/80 text-white rounded text-xs opacity-0 group-hover:opacity-100 focus:opacity-100 focus:ring-1 focus:ring-red-400 transition-all flex items-center justify-center" |
|
|
|
className={`absolute top-2 right-2 w-6 h-6 bg-black/60 hover:bg-red-600/80 text-white rounded text-xs focus:opacity-100 focus:ring-1 focus:ring-red-400 transition-all flex items-center justify-center ${mediaActionVisibility}`} |
|
|
|
> |
|
|
|
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}> |
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" /> |
|
|
|
|