generate iamge button
This commit is contained in:
@@ -152,6 +152,22 @@ export const createImagesPageConfig = (
|
||||
'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 (
|
||||
<Badge color={statusColors[value] || 'amber'} size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{labels[value] || value}</span>
|
||||
|
||||
Reference in New Issue
Block a user