Add notification preferences and admin governance

This commit is contained in:
Codex
2026-07-10 18:33:39 -05:00
parent eb9456e1bd
commit de9e473d3b
28 changed files with 734 additions and 20 deletions
@@ -29,6 +29,7 @@
@if ($attachment->caption)
<p class="mt-2 text-slate-600 dark:text-slate-400">{{ $attachment->caption }}</p>
@endif
<x-moderation-report-form type="attachment" :id="$attachment->id" />
</div>
@endforeach
</div>
@@ -0,0 +1,22 @@
@props(['type', 'id'])
@auth
<details class="mt-4 rounded-md border border-slate-200 p-4 text-sm dark:border-slate-800">
<summary class="cursor-pointer font-semibold text-slate-950 dark:text-white">Report for moderation</summary>
<form method="POST" action="{{ route('moderation-reports.store') }}" class="mt-3 space-y-3">
@csrf
<input type="hidden" name="reportable_type" value="{{ $type }}">
<input type="hidden" name="reportable_id" value="{{ $id }}">
<div>
<label class="block text-sm font-medium text-slate-800 dark:text-slate-200">Reason</label>
<select name="reason_code" class="mt-1 block w-full rounded-md border-slate-300 bg-white text-slate-950 shadow-sm focus:border-sky-500 focus:ring-sky-500 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100">
@foreach (\App\Models\ModerationReport::REASON_CODES as $code => $label)
<option value="{{ $code }}">{{ $label }}</option>
@endforeach
</select>
</div>
<x-field name="details" label="Details" textarea />
<x-secondary-button type="submit">Submit report</x-secondary-button>
</form>
</details>
@endauth