stlyes fixes
This commit is contained in:
@@ -50,7 +50,7 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
return (
|
||||
<Card className="p-4">
|
||||
<div className="text-center py-4">
|
||||
<div className="inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500 mb-2"></div>
|
||||
<div className="inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-brand-500 mb-2"></div>
|
||||
<div className="text-gray-500 dark:text-gray-400">Loading progress...</div>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -61,12 +61,12 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
return (
|
||||
<Card className="p-4">
|
||||
<div className="text-center py-4">
|
||||
<AlertCircleIcon className="w-8 h-8 text-red-500 mx-auto mb-2" />
|
||||
<div className="text-sm text-red-600 dark:text-red-400 mb-3">{error}</div>
|
||||
<AlertCircleIcon className="w-8 h-8 text-error-500 mx-auto mb-2" />
|
||||
<div className="text-sm text-error-600 dark:text-error-400 mb-3">{error}</div>
|
||||
<button
|
||||
onClick={handleRetry}
|
||||
disabled={retryCount >= 3}
|
||||
className="px-4 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-400 text-white rounded-lg text-sm font-medium transition-colors"
|
||||
className="px-4 py-2 bg-brand-500 hover:bg-brand-600 disabled:bg-gray-400 text-white rounded-lg text-sm font-medium transition-colors"
|
||||
aria-label="Retry loading site progress"
|
||||
>
|
||||
{retryCount >= 3 ? 'Max retries reached' : 'Retry'}
|
||||
@@ -185,7 +185,7 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
key={cluster.cluster_id}
|
||||
className={`p-4 rounded-lg border-2 ${
|
||||
cluster.is_complete
|
||||
? 'border-green-200 dark:border-green-800 bg-green-50 dark:bg-green-900/20'
|
||||
? 'border-success-200 dark:border-success-800 bg-success-50 dark:bg-success-900/20'
|
||||
: 'border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800'
|
||||
}`}
|
||||
>
|
||||
@@ -199,9 +199,9 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
{cluster.role}
|
||||
</Badge>
|
||||
{cluster.is_complete ? (
|
||||
<CheckCircleIcon className="w-4 h-4 text-green-600 dark:text-green-400" />
|
||||
<CheckCircleIcon className="w-4 h-4 text-success-600 dark:text-success-400" />
|
||||
) : (
|
||||
<AlertCircleIcon className="w-4 h-4 text-amber-600 dark:text-amber-400" />
|
||||
<AlertCircleIcon className="w-4 h-4 text-warning-600 dark:text-warning-400" />
|
||||
)}
|
||||
</div>
|
||||
<div className="text-xs text-gray-600 dark:text-gray-400">
|
||||
@@ -210,7 +210,7 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
</div>
|
||||
<button
|
||||
onClick={() => navigate(`/planner/clusters/${cluster.cluster_id}`)}
|
||||
className="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1 transition-colors"
|
||||
className="text-xs text-brand-600 dark:text-brand-400 hover:underline flex items-center gap-1 transition-colors"
|
||||
aria-label={`View cluster ${cluster.cluster_name}`}
|
||||
>
|
||||
View <ArrowRightIcon className="w-3 h-3" />
|
||||
@@ -227,8 +227,8 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
<div
|
||||
className={`h-2 rounded-full ${
|
||||
cluster.is_complete
|
||||
? 'bg-green-500 dark:bg-green-400'
|
||||
: 'bg-blue-500 dark:bg-blue-400'
|
||||
? 'bg-success-500 dark:bg-success-400'
|
||||
: 'bg-brand-500 dark:bg-brand-400'
|
||||
}`}
|
||||
style={{ width: `${completionPercent}%` }}
|
||||
/>
|
||||
@@ -254,13 +254,13 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
{/* Validation Messages */}
|
||||
{cluster.validation_messages && cluster.validation_messages.length > 0 && (
|
||||
<div className="mt-3 pt-3 border-t border-gray-200 dark:border-gray-700">
|
||||
<div className="text-xs font-medium text-red-600 dark:text-red-400 mb-1">
|
||||
<div className="text-xs font-medium text-error-600 dark:text-error-400 mb-1">
|
||||
Issues:
|
||||
</div>
|
||||
<ul className="text-xs text-gray-600 dark:text-gray-400 space-y-1">
|
||||
{cluster.validation_messages.map((msg, idx) => (
|
||||
<li key={idx} className="flex items-start gap-1">
|
||||
<XCircleIcon className="w-3 h-3 text-red-500 mt-0.5 flex-shrink-0" />
|
||||
<XCircleIcon className="w-3 h-3 text-error-500 mt-0.5 flex-shrink-0" />
|
||||
<span>{msg}</span>
|
||||
</li>
|
||||
))}
|
||||
@@ -286,33 +286,33 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<div className="flex items-center gap-2">
|
||||
{validationFlags.clusters_attached ? (
|
||||
<CheckCircleIcon className="w-4 h-4 text-green-600 dark:text-green-400" />
|
||||
<CheckCircleIcon className="w-4 h-4 text-success-600 dark:text-success-400" />
|
||||
) : (
|
||||
<XCircleIcon className="w-4 h-4 text-red-600 dark:text-red-400" />
|
||||
<XCircleIcon className="w-4 h-4 text-error-600 dark:text-error-400" />
|
||||
)}
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">Clusters Attached</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{validationFlags.taxonomies_defined ? (
|
||||
<CheckCircleIcon className="w-4 h-4 text-green-600 dark:text-green-400" />
|
||||
<CheckCircleIcon className="w-4 h-4 text-success-600 dark:text-success-400" />
|
||||
) : (
|
||||
<XCircleIcon className="w-4 h-4 text-red-600 dark:text-red-400" />
|
||||
<XCircleIcon className="w-4 h-4 text-error-600 dark:text-error-400" />
|
||||
)}
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">Taxonomies Defined</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{validationFlags.sitemap_generated ? (
|
||||
<CheckCircleIcon className="w-4 h-4 text-green-600 dark:text-green-400" />
|
||||
<CheckCircleIcon className="w-4 h-4 text-success-600 dark:text-success-400" />
|
||||
) : (
|
||||
<XCircleIcon className="w-4 h-4 text-red-600 dark:text-red-400" />
|
||||
<XCircleIcon className="w-4 h-4 text-error-600 dark:text-error-400" />
|
||||
)}
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">Sitemap Generated</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{validationFlags.all_pages_generated ? (
|
||||
<CheckCircleIcon className="w-4 h-4 text-green-600 dark:text-green-400" />
|
||||
<CheckCircleIcon className="w-4 h-4 text-success-600 dark:text-success-400" />
|
||||
) : (
|
||||
<XCircleIcon className="w-4 h-4 text-red-600 dark:text-red-400" />
|
||||
<XCircleIcon className="w-4 h-4 text-error-600 dark:text-error-400" />
|
||||
)}
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">All Pages Generated</span>
|
||||
</div>
|
||||
@@ -322,10 +322,10 @@ export default function SiteProgressWidget({ blueprintId, siteId }: SiteProgress
|
||||
|
||||
{/* Error banner if data loaded but has errors */}
|
||||
{error && progress && (
|
||||
<div className="mt-4 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
|
||||
<div className="mt-4 p-3 bg-warning-50 dark:bg-warning-900/20 border border-warning-200 dark:border-warning-800 rounded-lg">
|
||||
<div className="flex items-start gap-2">
|
||||
<AlertCircleIcon className="w-4 h-4 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0" />
|
||||
<div className="text-xs text-yellow-800 dark:text-yellow-300">
|
||||
<AlertCircleIcon className="w-4 h-4 text-warning-600 dark:text-warning-400 mt-0.5 flex-shrink-0" />
|
||||
<div className="text-xs text-warning-800 dark:text-warning-300">
|
||||
Some data may be outdated. <button onClick={handleRetry} className="underline font-medium">Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@ export default function SiteSetupChecklist({
|
||||
key={item.id}
|
||||
className={`w-2 h-2 rounded-full ${
|
||||
item.completed
|
||||
? 'bg-green-500'
|
||||
? 'bg-success-500'
|
||||
: 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
title={item.label}
|
||||
@@ -92,7 +92,7 @@ export default function SiteSetupChecklist({
|
||||
{completedCount}/{totalCount}
|
||||
</span>
|
||||
{isComplete && (
|
||||
<span className="text-xs text-green-600 dark:text-green-400 font-medium">
|
||||
<span className="text-xs text-success-600 dark:text-success-400 font-medium">
|
||||
✓ Ready
|
||||
</span>
|
||||
)}
|
||||
@@ -116,7 +116,7 @@ export default function SiteSetupChecklist({
|
||||
<div className="w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-full mb-4">
|
||||
<div
|
||||
className={`h-full rounded-full transition-all duration-500 ${
|
||||
isComplete ? 'bg-green-500' : 'bg-blue-500'
|
||||
isComplete ? 'bg-success-500' : 'bg-brand-500'
|
||||
}`}
|
||||
style={{ width: `${progressPercent}%` }}
|
||||
/>
|
||||
@@ -133,7 +133,7 @@ export default function SiteSetupChecklist({
|
||||
<div
|
||||
className={`flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center ${
|
||||
item.completed
|
||||
? 'bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400'
|
||||
? 'bg-success-100 dark:bg-success-900/30 text-success-600 dark:text-success-400'
|
||||
: 'bg-gray-100 dark:bg-gray-800 text-gray-400 dark:text-gray-500'
|
||||
}`}
|
||||
>
|
||||
@@ -158,9 +158,9 @@ export default function SiteSetupChecklist({
|
||||
|
||||
{/* Action button */}
|
||||
{isComplete ? (
|
||||
<div className="flex items-center gap-2 p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg">
|
||||
<CheckLineIcon className="w-5 h-5 text-green-600 dark:text-green-400" />
|
||||
<span className="text-sm font-medium text-green-700 dark:text-green-300">
|
||||
<div className="flex items-center gap-2 p-3 bg-success-50 dark:bg-success-900/20 border border-success-200 dark:border-success-800 rounded-lg">
|
||||
<CheckLineIcon className="w-5 h-5 text-success-600 dark:text-success-400" />
|
||||
<span className="text-sm font-medium text-success-700 dark:text-success-300">
|
||||
Ready to create content!
|
||||
</span>
|
||||
<Button
|
||||
|
||||
@@ -179,7 +179,7 @@ export default function TemplateLibrary({
|
||||
</div>
|
||||
)}
|
||||
{template.featured && (
|
||||
<span className="absolute top-2 left-2 bg-yellow-500 text-white text-xs px-2 py-1 rounded">
|
||||
<span className="absolute top-2 left-2 bg-warning-500 text-white text-xs px-2 py-1 rounded">
|
||||
Featured
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -48,8 +48,8 @@ export default function WordPressIntegrationCard({
|
||||
<Card className="p-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-3 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
|
||||
<div className="p-3 bg-purple-100 dark:bg-purple-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">
|
||||
@@ -73,8 +73,8 @@ export default function WordPressIntegrationCard({
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-3 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
|
||||
<div className="p-3 bg-purple-100 dark:bg-purple-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">
|
||||
@@ -101,13 +101,13 @@ export default function WordPressIntegrationCard({
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400 mb-1">Sync Status</p>
|
||||
<div className="flex items-center gap-2">
|
||||
{integration.sync_status === 'success' || integration.sync_status === 'healthy' ? (
|
||||
<CheckCircle className="w-4 h-4 text-green-500" />
|
||||
<CheckCircle className="w-4 h-4 text-success-500" />
|
||||
) : integration.sync_status === 'failed' || integration.sync_status === 'error' ? (
|
||||
<XCircle className="w-4 h-4 text-red-500" />
|
||||
<XCircle className="w-4 h-4 text-error-500" />
|
||||
) : integration.sync_status === 'warning' ? (
|
||||
<AlertCircle className="w-4 h-4 text-yellow-500" />
|
||||
<AlertCircle className="w-4 h-4 text-warning-500" />
|
||||
) : (
|
||||
<RefreshCw className="w-4 h-4 text-yellow-500 animate-spin" />
|
||||
<RefreshCw className="w-4 h-4 text-warning-500 animate-spin" />
|
||||
)}
|
||||
<span className="text-sm font-medium text-gray-900 dark:text-white capitalize">
|
||||
{integration.sync_status === 'healthy' ? 'Healthy' :
|
||||
@@ -132,7 +132,7 @@ export default function WordPressIntegrationCard({
|
||||
<div className="pt-2 border-t border-gray-200 dark:border-gray-700">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<AlertCircle className="w-4 h-4 text-yellow-500" />
|
||||
<AlertCircle className="w-4 h-4 text-warning-500" />
|
||||
<span className="text-sm text-gray-600 dark:text-gray-400">
|
||||
{integration.mismatch_count} sync mismatch{integration.mismatch_count !== 1 ? 'es' : ''} detected
|
||||
</span>
|
||||
@@ -153,14 +153,14 @@ export default function WordPressIntegrationCard({
|
||||
|
||||
{integration.sync_error && (
|
||||
<div className="pt-2 border-t border-gray-200 dark:border-gray-700">
|
||||
<div className="p-2 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
|
||||
<div className="p-2 bg-error-50 dark:bg-error-900/20 border border-error-200 dark:border-error-800 rounded-lg">
|
||||
<div className="flex items-start gap-2">
|
||||
<XCircle className="w-4 h-4 text-red-500 mt-0.5 flex-shrink-0" />
|
||||
<XCircle className="w-4 h-4 text-error-500 mt-0.5 flex-shrink-0" />
|
||||
<div className="flex-1">
|
||||
<p className="text-xs font-medium text-red-800 dark:text-red-300 mb-1">
|
||||
<p className="text-xs font-medium text-error-800 dark:text-error-300 mb-1">
|
||||
Sync Error
|
||||
</p>
|
||||
<p className="text-xs text-red-700 dark:text-red-400">
|
||||
<p className="text-xs text-error-700 dark:text-error-400">
|
||||
{integration.sync_error}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -201,8 +201,8 @@ export default function WordPressIntegrationForm({
|
||||
{/* Header with Toggle */}
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-3 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
|
||||
<div className="p-3 bg-purple-100 dark:bg-purple-900/30 rounded-lg">
|
||||
<Globe className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
||||
</div>
|
||||
<div>
|
||||
<h2 className="text-xl font-semibold text-gray-900 dark:text-white">
|
||||
@@ -343,7 +343,7 @@ export default function WordPressIntegrationForm({
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-5 py-3 whitespace-nowrap">
|
||||
<span className="inline-flex items-center justify-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-green-50 text-green-600 dark:bg-green-500/15 dark:text-green-500">
|
||||
<span className="inline-flex items-center justify-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-success-50 text-success-600 dark:bg-success-500/15 dark:text-success-500">
|
||||
Active
|
||||
</span>
|
||||
</td>
|
||||
@@ -387,7 +387,7 @@ export default function WordPressIntegrationForm({
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2">
|
||||
<DownloadIcon className="w-5 h-5 text-indigo-600 dark:text-indigo-400" />
|
||||
<DownloadIcon className="w-5 h-5 text-purple-600 dark:text-purple-400" />
|
||||
IGNY8 WP Bridge Plugin
|
||||
</h3>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400 mt-1">
|
||||
|
||||
@@ -69,8 +69,8 @@ export default function WordPressIntegrationModal({
|
||||
<div className="p-6">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-2 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg">
|
||||
<Globe className="w-5 h-5 text-indigo-600 dark:text-indigo-400" />
|
||||
<div className="p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg">
|
||||
<Globe className="w-5 h-5 text-purple-600 dark:text-purple-400" />
|
||||
</div>
|
||||
<h2 className="text-xl font-semibold text-gray-900 dark:text-white">
|
||||
{initialData ? 'Edit WordPress Integration' : 'Connect WordPress Site'}
|
||||
@@ -85,10 +85,10 @@ export default function WordPressIntegrationModal({
|
||||
</div>
|
||||
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div className="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4">
|
||||
<div className="bg-brand-50 dark:bg-brand-900/20 border border-brand-200 dark:border-brand-800 rounded-lg p-4 mb-4">
|
||||
<div className="flex items-start gap-3">
|
||||
<AlertCircle className="w-5 h-5 text-blue-600 dark:text-blue-400 mt-0.5 flex-shrink-0" />
|
||||
<div className="text-sm text-blue-800 dark:text-blue-300">
|
||||
<AlertCircle className="w-5 h-5 text-brand-600 dark:text-brand-400 mt-0.5 flex-shrink-0" />
|
||||
<div className="text-sm text-brand-800 dark:text-brand-300">
|
||||
<p className="font-medium mb-1">WordPress Application Password Required</p>
|
||||
<p>
|
||||
You need to create an Application Password in WordPress. Go to Users → Profile →
|
||||
|
||||
Reference in New Issue
Block a user