diff --git a/admin/src/app/moderation/page.tsx b/admin/src/app/moderation/page.tsx index c262125..6e06c7c 100644 --- a/admin/src/app/moderation/page.tsx +++ b/admin/src/app/moderation/page.tsx @@ -28,6 +28,16 @@ export default function ModerationPage() { const [statusFilter, setStatusFilter] = useState('pending'); const [reviewingId, setReviewingId] = useState(null); const [reason, setReason] = useState(''); + const [customReason, setCustomReason] = useState(false); + + const banReasons = [ + 'Hate speech or slurs', + 'Harassment or bullying', + 'Spam or scam activity', + 'Posting illegal content', + 'Repeated violations after warnings', + 'Ban evasion (alt account)', + ]; const [selected, setSelected] = useState>(new Set()); const [bulkLoading, setBulkLoading] = useState(false); @@ -198,9 +208,36 @@ export default function ModerationPage() { {reviewingId === item.id && (

Ban user and remove content

- setReason(e.target.value)} /> +
+ {banReasons.map((preset) => ( + + ))} + +
+ {customReason && ( + setReason(e.target.value)} autoFocus /> + )}
- +
diff --git a/admin/src/app/users/[id]/page.tsx b/admin/src/app/users/[id]/page.tsx index 80c339e..be1bcd0 100644 --- a/admin/src/app/users/[id]/page.tsx +++ b/admin/src/app/users/[id]/page.tsx @@ -16,6 +16,32 @@ export default function UserDetailPage() { const [actionLoading, setActionLoading] = useState(false); const [showModal, setShowModal] = useState(null); const [reason, setReason] = useState(''); + const [customReason, setCustomReason] = useState(false); + + const reasonPresets: Record = { + banned: [ + 'Hate speech or slurs', + 'Harassment or bullying', + 'Spam or scam activity', + 'Posting illegal content', + 'Impersonation', + 'Repeated violations after warnings', + 'Ban evasion (alt account)', + ], + suspended: [ + 'Posting inappropriate content', + 'Minor harassment', + 'Spam behavior', + 'Violating community guidelines', + 'Cooling-off period after heated exchange', + ], + active: [ + 'Appeal reviewed and approved', + 'Ban was issued in error', + 'Suspension period served', + 'User agreed to follow guidelines', + ], + }; const fetchUser = () => { setLoading(true); @@ -236,21 +262,52 @@ export default function UserDetailPage() { {/* Status Change Modal */} {showModal && ( -
setShowModal(null)}> +
{ setShowModal(null); setReason(''); setCustomReason(false); }}>
e.stopPropagation()}>

{showModal === 'active' ? 'Activate' : showModal === 'suspended' ? 'Suspend' : 'Ban'} User

-

Please provide a reason for this action.

-