generate iamge button

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-03 19:09:31 +00:00
parent a1016ec1c2
commit a70f8cdd01

View File

@@ -152,6 +152,22 @@ export const createImagesPageConfig = (
'failed': 'Failed', 'failed': 'Failed',
}; };
// Show Generate button for pending status
if (value === 'pending' && handlers.onGenerateImages) {
return (
<button
onClick={(e) => {
e.stopPropagation();
handlers.onGenerateImages!(row.content_id);
}}
className="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-md bg-brand-500 text-white hover:bg-brand-600 transition-colors"
>
<BoltIcon className="w-3.5 h-3.5" />
Generate
</button>
);
}
return ( return (
<Badge color={statusColors[value] || 'amber'} size="xs" variant="soft"> <Badge color={statusColors[value] || 'amber'} size="xs" variant="soft">
<span className="text-[11px] font-normal">{labels[value] || value}</span> <span className="text-[11px] font-normal">{labels[value] || value}</span>