mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 07:31:12 -05:00
Refactor: Approve tool use
This commit is contained in:
@@ -85,6 +85,33 @@ export function SubmissionChangesDisplay({
|
||||
);
|
||||
|
||||
if (view === 'summary') {
|
||||
// Special compact display for photo deletions
|
||||
if (item.item_type === 'photo_delete') {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
{getEntityIcon()}
|
||||
<span className="font-medium">{changes.entityName}</span>
|
||||
{getActionBadge()}
|
||||
</div>
|
||||
|
||||
{changes.photoChanges.length > 0 && changes.photoChanges[0].type === 'deleted' && (
|
||||
<PhotoDeletionPreview
|
||||
photo={{
|
||||
url: changes.photoChanges[0].photo?.url || item.item_data?.cloudflare_image_url || '',
|
||||
title: changes.photoChanges[0].photo?.title || item.item_data?.title,
|
||||
caption: changes.photoChanges[0].photo?.caption || item.item_data?.caption,
|
||||
entity_type: item.item_data?.entity_type,
|
||||
entity_name: changes.entityName,
|
||||
deletion_reason: changes.photoChanges[0].photo?.deletion_reason || item.item_data?.deletion_reason || item.item_data?.reason
|
||||
}}
|
||||
compact={true}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
@@ -146,7 +173,34 @@ export function SubmissionChangesDisplay({
|
||||
);
|
||||
}
|
||||
|
||||
// Detailed view
|
||||
// Detailed view - special handling for photo deletions
|
||||
if (item.item_type === 'photo_delete') {
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
{getEntityIcon()}
|
||||
<h3 className="text-lg font-semibold">{changes.entityName}</h3>
|
||||
{getActionBadge()}
|
||||
</div>
|
||||
|
||||
{changes.photoChanges.length > 0 && changes.photoChanges[0].type === 'deleted' && (
|
||||
<PhotoDeletionPreview
|
||||
photo={{
|
||||
url: changes.photoChanges[0].photo?.url || item.item_data?.cloudflare_image_url || '',
|
||||
title: changes.photoChanges[0].photo?.title || item.item_data?.title,
|
||||
caption: changes.photoChanges[0].photo?.caption || item.item_data?.caption,
|
||||
entity_type: item.item_data?.entity_type,
|
||||
entity_name: changes.entityName,
|
||||
deletion_reason: changes.photoChanges[0].photo?.deletion_reason || item.item_data?.deletion_reason || item.item_data?.reason
|
||||
}}
|
||||
compact={false}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Detailed view for other items
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user