{# Flag shadowban toggle with a reason. `target`, `ignored`, `name`,
`swap_target` (CSS selector the answer replaces), `post_id` (queue) and
`mode`. #}
{% if ignored %}
<form hx-post="/admin/users/{{ target }}/flag-unshadowban" hx-target="{{ swap_target }}" hx-select="unset" hx-swap="outerHTML" class="m-0 inline">
<input type="hidden" name="mode" value="{{ mode }}">{% if post_id %}<input type="hidden" name="post" value="{{ post_id }}">{% endif %}
<button class="btn btn-ghost btn-xs" type="submit" title="Their flags count again">Count {{ name }}'s flags</button>
</form>
{% else %}
<details class="dropdown">
<summary class="btn btn-ghost btn-xs list-none" title="Flag shadowban: their flags are recorded but don't count or show in the queue; they aren't told">Ignore {{ name }}'s flags…</summary>
<form hx-post="/admin/users/{{ target }}/flag-shadowban" hx-target="{{ swap_target }}" hx-select="unset" hx-swap="outerHTML"
class="dropdown-content z-20 mt-1 w-64 space-y-2 rounded-box border border-base-300 bg-base-100 p-3 shadow-lg">
<input type="hidden" name="mode" value="{{ mode }}">{% if post_id %}<input type="hidden" name="post" value="{{ post_id }}">{% endif %}
<p class="text-xs opacity-70">Their flags stop counting and leave the queue. They aren't told.</p>
<input name="reason" class="input input-bordered input-xs w-full" placeholder="Reason (staff only)">
<div class="flex justify-end"><button class="btn btn-xs btn-neutral" type="submit">Ignore their flags</button></div>
</form>
</details>
{% endif %}
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions running · Badges · Packages
⭐
Log in to mark this repository.
1.5 KiB · text
History
3d71adc