Update ContentImageCell.tsx
This commit is contained in:
@@ -128,45 +128,12 @@ export default function ContentImageCell({ image, maxPromptLength = 100 }: Conte
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{/* Always show "View Original" button if image_url is available */}
|
||||
{image.image_url && (
|
||||
<a
|
||||
href={image.image_url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="block w-full text-center px-2 py-1 text-xs text-brand-500 hover:text-brand-600 dark:text-brand-400 dark:hover:text-brand-300 border border-brand-300 dark:border-brand-700 rounded hover:bg-brand-50 dark:hover:bg-brand-900/20 transition-colors"
|
||||
>
|
||||
View Original
|
||||
</a>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<div className="w-full h-24 bg-gray-200 dark:bg-gray-700 rounded border-2 border-dashed border-gray-300 dark:border-gray-600 flex items-center justify-center">
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">No image available</p>
|
||||
</div>
|
||||
)}
|
||||
{/* Always display database field values below image/placeholder */}
|
||||
<div className="mt-2 p-2 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 text-xs font-mono">
|
||||
<div className="text-gray-600 dark:text-gray-400 mb-1">
|
||||
<span className="text-gray-500 dark:text-gray-500">class Images(SiteSectorBaseModel):</span>
|
||||
</div>
|
||||
<div className="ml-4 text-gray-700 dark:text-gray-300">
|
||||
<div className="mb-1">
|
||||
<span className="text-purple-600 dark:text-purple-400">image_url</span>
|
||||
<span className="text-gray-500 dark:text-gray-500"> = </span>
|
||||
<span className="text-blue-600 dark:text-blue-400 break-all">
|
||||
{image.image_url || <span className="text-gray-400 italic">null</span>}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="text-purple-600 dark:text-purple-400">image_path</span>
|
||||
<span className="text-gray-500 dark:text-gray-500"> = </span>
|
||||
<span className="text-green-600 dark:text-green-400 break-all">
|
||||
{image.image_path || <span className="text-gray-400 italic">null</span>}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user