mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 09:51:13 -05:00
Refactor: Improve moderation queue layout
This commit is contained in:
@@ -192,7 +192,7 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((props, ref) => {
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<div className={isMobile ? 'space-y-6' : 'grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6'}>
|
<div className="space-y-6">
|
||||||
{queueManager.items.map((item, index) => (
|
{queueManager.items.map((item, index) => (
|
||||||
<QueueItem
|
<QueueItem
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export const QueueItem = memo(({
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className={`h-full border-l-4 transition-all duration-300 ${
|
className={`border-l-4 transition-all duration-300 ${
|
||||||
item._removing ? 'opacity-0 scale-95 pointer-events-none' : ''
|
item._removing ? 'opacity-0 scale-95 pointer-events-none' : ''
|
||||||
} ${
|
} ${
|
||||||
hasModeratorEdits ? 'ring-2 ring-blue-200 dark:ring-blue-800' : ''
|
hasModeratorEdits ? 'ring-2 ring-blue-200 dark:ring-blue-800' : ''
|
||||||
@@ -233,8 +233,8 @@ export const QueueItem = memo(({
|
|||||||
)}
|
)}
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent className={`space-y-4 ${isMobile ? 'p-4 pt-0' : ''}`}>
|
<CardContent className={`${isMobile ? 'p-4 pt-0 space-y-4' : 'grid grid-cols-1 lg:grid-cols-2 gap-6'}`}>
|
||||||
<div className={`bg-muted/50 rounded-lg ${isMobile ? 'p-3' : 'p-4'}`}>
|
<div className={`bg-muted/50 rounded-lg ${isMobile ? 'p-3' : 'p-4'} ${isMobile ? '' : 'lg:col-span-1'}`}>
|
||||||
{item.type === 'review' ? (
|
{item.type === 'review' ? (
|
||||||
<div>
|
<div>
|
||||||
{item.content.title && (
|
{item.content.title && (
|
||||||
@@ -363,7 +363,27 @@ export const QueueItem = memo(({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Action buttons based on status */}
|
{/* Notes and metadata column on desktop */}
|
||||||
|
<div className={`space-y-4 ${isMobile ? '' : 'lg:col-span-1'}`}>
|
||||||
|
{(item.status === 'pending' || item.status === 'flagged') && (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<Label htmlFor={`notes-${item.id}`}>Moderation Notes</Label>
|
||||||
|
<Textarea
|
||||||
|
id={`notes-${item.id}`}
|
||||||
|
placeholder="Add notes about your moderation decision..."
|
||||||
|
value={notes[item.id] || ''}
|
||||||
|
onChange={(e) => onNoteChange(item.id, e.target.value)}
|
||||||
|
onFocus={() => onInteractionFocus(item.id)}
|
||||||
|
onBlur={() => onInteractionBlur(item.id)}
|
||||||
|
rows={isMobile ? 2 : 6}
|
||||||
|
disabled={isLockedByOther || currentLockSubmissionId !== item.id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Action buttons - full width below columns */}
|
||||||
|
<div className={`${isMobile ? '' : 'lg:col-span-2'} space-y-4`}>
|
||||||
{(item.status === 'pending' || item.status === 'flagged') && (
|
{(item.status === 'pending' || item.status === 'flagged') && (
|
||||||
<>
|
<>
|
||||||
{/* Claim button for unclaimed submissions */}
|
{/* Claim button for unclaimed submissions */}
|
||||||
@@ -399,20 +419,6 @@ export const QueueItem = memo(({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="space-y-2">
|
|
||||||
<Label htmlFor={`notes-${item.id}`}>Moderation Notes (optional)</Label>
|
|
||||||
<Textarea
|
|
||||||
id={`notes-${item.id}`}
|
|
||||||
placeholder="Add notes about your moderation decision..."
|
|
||||||
value={notes[item.id] || ''}
|
|
||||||
onChange={(e) => onNoteChange(item.id, e.target.value)}
|
|
||||||
onFocus={() => onInteractionFocus(item.id)}
|
|
||||||
onBlur={() => onInteractionBlur(item.id)}
|
|
||||||
rows={2}
|
|
||||||
disabled={isLockedByOther || currentLockSubmissionId !== item.id}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className={isMobile ? 'flex flex-col gap-2 pt-2' : 'grid grid-cols-2 lg:grid-cols-4 gap-2 pt-2'}>
|
<div className={isMobile ? 'flex flex-col gap-2 pt-2' : 'grid grid-cols-2 lg:grid-cols-4 gap-2 pt-2'}>
|
||||||
{/* Show Review Items button for content submissions */}
|
{/* Show Review Items button for content submissions */}
|
||||||
{item.type === 'content_submission' && (
|
{item.type === 'content_submission' && (
|
||||||
@@ -622,6 +628,7 @@ export const QueueItem = memo(({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user