many changes for modules widgets and colors and styling

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-31 23:52:43 +00:00
parent b61bd6e64d
commit 89b64cd737
34 changed files with 2450 additions and 1985 deletions

View File

@@ -27,7 +27,7 @@ import ImageQueueModal, { ImageQueueItem } from '../../components/common/ImageQu
import SingleRecordStatusUpdateModal from '../../components/common/SingleRecordStatusUpdateModal';
import PageHeader from '../../components/common/PageHeader';
import { Modal } from '../../components/ui/modal';
import ThreeWidgetFooter from '../../components/dashboard/ThreeWidgetFooter';
import StandardThreeWidgetFooter from '../../components/dashboard/StandardThreeWidgetFooter';
export default function Images() {
const toast = useToast();
@@ -664,84 +664,35 @@ export default function Images() {
)}
</Modal>
{/* Three Widget Footer - Section 3 Layout */}
<ThreeWidgetFooter
{/* Three Widget Footer - Section 3 Layout with Standardized Workflow Widget */}
<StandardThreeWidgetFooter
submoduleColor="purple"
pageProgress={{
title: 'Page Progress',
submoduleColor: 'purple',
metrics: [
{ label: 'Total', value: totalCount },
{ label: 'Generated', value: images.filter(i => i.images?.some(img => img.status === 'generated')).length, percentage: `${totalCount > 0 ? Math.round((images.filter(i => i.images?.some(img => img.status === 'generated')).length / totalCount) * 100) : 0}%` },
{ label: 'Pending', value: images.filter(i => i.images?.some(img => img.status === 'pending')).length },
{ label: 'Content Items', value: totalCount },
{ label: 'Complete', value: totalComplete, percentage: `${totalCount > 0 ? Math.round((totalComplete / totalCount) * 100) : 0}%` },
{ label: 'Partial', value: totalPartial },
{ label: 'Pending', value: totalPending },
],
progress: {
value: totalCount > 0 ? Math.round((images.filter(i => i.images?.some(img => img.status === 'generated')).length / totalCount) * 100) : 0,
label: 'Generated',
value: totalCount > 0 ? Math.round((totalComplete / totalCount) * 100) : 0,
label: 'Complete',
color: 'purple',
},
hint: images.filter(i => i.images?.some(img => img.status === 'pending')).length > 0
? `${images.filter(i => i.images?.some(img => img.status === 'pending')).length} content item${images.filter(i => i.images?.some(img => img.status === 'pending')).length !== 1 ? 's' : ''} need image generation`
hint: totalPending > 0
? `${totalPending} content item${totalPending !== 1 ? 's' : ''} need image generation`
: 'All images generated!',
statusInsight: totalPending > 0
? `Select content items and generate images for articles.`
: totalComplete > 0
? `Images ready. Submit content to Review for publishing.`
: `No content with image prompts. Generate content first.`,
}}
moduleStats={{
title: 'Writer Module',
pipeline: [
{
fromLabel: 'Tasks',
fromValue: 0,
fromHref: '/writer/tasks',
actionLabel: 'Generate Content',
toLabel: 'Drafts',
toValue: 0,
toHref: '/writer/content',
progress: 0,
color: 'blue',
},
{
fromLabel: 'Drafts',
fromValue: 0,
fromHref: '/writer/content',
actionLabel: 'Generate Images',
toLabel: 'Images',
toValue: totalImagesCount,
toHref: '/writer/images',
progress: 100,
color: 'purple',
},
{
fromLabel: 'Ready',
fromValue: 0,
fromHref: '/writer/review',
actionLabel: 'Review & Publish',
toLabel: 'Published',
toValue: 0,
toHref: '/writer/published',
progress: 0,
color: 'green',
},
],
links: [
{ label: 'Tasks', href: '/writer/tasks' },
{ label: 'Content', href: '/writer/content' },
{ label: 'Images', href: '/writer/images' },
{ label: 'Published', href: '/writer/published' },
],
}}
completion={{
title: 'Workflow Completion',
plannerItems: [
{ label: 'Keywords Clustered', value: 0, color: 'blue' },
{ label: 'Clusters Created', value: 0, color: 'green' },
{ label: 'Ideas Generated', value: 0, color: 'amber' },
],
writerItems: [
{ label: 'Content Generated', value: 0, color: 'blue' },
{ label: 'Images Created', value: totalImagesCount, color: 'purple' },
{ label: 'Articles Published', value: 0, color: 'green' },
],
analyticsHref: '/account/usage',
}}
module="writer"
showCredits={true}
analyticsHref="/account/usage"
/>
</>
);