From ef1a7f2dec937ad7d9765894e04db4a507fc7070 Mon Sep 17 00:00:00 2001 From: alorig <220087330+alorig@users.noreply.github.com> Date: Fri, 28 Nov 2025 16:16:55 +0500 Subject: [PATCH] Revert "Update content.config.tsx" This reverts commit d97b9962fd13f9635c6d351e0861a27f7887cf45. --- frontend/src/config/pages/content.config.tsx | 90 ++++++++++++++------ 1 file changed, 64 insertions(+), 26 deletions(-) diff --git a/frontend/src/config/pages/content.config.tsx b/frontend/src/config/pages/content.config.tsx index b919a085..1354650b 100644 --- a/frontend/src/config/pages/content.config.tsx +++ b/frontend/src/config/pages/content.config.tsx @@ -207,7 +207,65 @@ export const createContentPageConfig = ( ); }, }, - // Removed the separate status icon column. Status icon will be shown in the Created column below. + { + key: 'content_status_indicators', + label: 'Status', + sortable: false, + width: '100px', + align: 'center' as const, + render: (_value: any, row: Content) => { + const hasPrompts = row.has_image_prompts || false; + const hasImages = row.has_generated_images || false; + + return ( +
+ {/* Prompts Icon */} +
+ + + +
+ + {/* Images Icon */} +
+ + + + + +
+
+ ); + }, + }, { key: 'source', label: 'Source', @@ -260,38 +318,18 @@ export const createContentPageConfig = ( label: 'Created', align: 'right', render: (value: string, row: Content) => { - // Image status logic: pending (prompt exists, no image), generated, failed - let status = null; - if (row.image_status === 'failed') { - status = 'failed'; - } else if (row.image_status === 'generated' || row.has_generated_images) { - status = 'generated'; - } else if (row.has_image_prompts) { - status = 'pending'; - } - - const statusColors: Record = { - 'pending': 'text-amber-500 dark:text-amber-400', - 'generated': 'text-green-500 dark:text-green-400', - 'failed': 'text-red-500 dark:text-red-400', - }; - const statusTitles: Record = { - 'pending': 'Images pending', - 'generated': 'Images generated', - 'failed': 'Image generation failed', - }; - + const hasImages = row.has_generated_images || false; + return (
{formatRelativeDate(value)} - {status && ( + {hasImages && (
- {/* Single icon for all statuses */}