From 831b179c4959f3f1521683e1ec938be616b5c61b Mon Sep 17 00:00:00 2001
From: alorig <220087330+alorig@users.noreply.github.com>
Date: Fri, 28 Nov 2025 16:19:16 +0500
Subject: [PATCH] 12
---
frontend/src/config/pages/content.config.tsx | 144 ++++++++-----------
1 file changed, 63 insertions(+), 81 deletions(-)
diff --git a/frontend/src/config/pages/content.config.tsx b/frontend/src/config/pages/content.config.tsx
index 1354650b..ec60b83f 100644
--- a/frontend/src/config/pages/content.config.tsx
+++ b/frontend/src/config/pages/content.config.tsx
@@ -207,65 +207,7 @@ export const createContentPageConfig = (
);
},
},
- {
- 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 */}
-
-
- );
- },
- },
+ // Removed the separate Status icon column. Both icons will be shown in the Created column below.
{
key: 'source',
label: 'Source',
@@ -318,34 +260,74 @@ export const createContentPageConfig = (
label: 'Created',
align: 'right',
render: (value: string, row: Content) => {
- const hasImages = row.has_generated_images || false;
-
+ // Prompt icon logic (unchanged)
+ const hasPrompts = row.has_image_prompts || false;
+
+ // Image icon logic (status-aware)
+ let imageStatus: 'pending' | 'generated' | 'failed' | null = null;
+ if (row.image_status === 'failed') {
+ imageStatus = 'failed';
+ } else if (row.image_status === 'generated' || row.has_generated_images) {
+ imageStatus = 'generated';
+ } else if (row.has_image_prompts) {
+ imageStatus = 'pending';
+ }
+ const imageStatusColors: 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 imageStatusTitles: Record = {
+ 'pending': 'Images pending',
+ 'generated': 'Images generated',
+ 'failed': 'Image generation failed',
+ };
+
return (
{formatRelativeDate(value)}
- {hasImages && (
-
- )}
+
+
+
+ {/* Images Icon (status-aware) */}
+
);
},