{# The flags on a queue item: counted ones, then (collapsed) those from
flag-shadowbanned flaggers. Each flagger shows their record and the
shadowban toggle. #}
{% macro flag_line(f, item, mode) %}
<li class="flex flex-wrap items-center gap-x-2 gap-y-0.5" data-flagger="{{ f.flagger }}">
<span class="badge badge-error badge-outline badge-sm">{{ f.reason_label }}</span>
<a href="/admin/users/{{ f.flagger_id }}" class="font-medium link link-hover" title="Manage {{ f.flagger }}">{{ f.flagger }}</a>
<span class="opacity-60" title="Their flags: upheld / dismissed / pending">✓{{ f.record.upheld }} ✗{{ f.record.dismissed }}{% if f.record.pending > 1 %} …{{ f.record.pending }}{% endif %}</span>
<span class="opacity-50" title="{{ f.created_abs }}">{{ f.created_rel }}</span>
{% with target = f.flagger_id, ignored = f.ignored, name = f.flagger, swap_target = "#flags-" ~ item.post_id, post_id = item.post_id %}{% include "admin/_shadow_form.html" %}{% endwith %}
{% if f.note %}<p class="w-full text-xs italic opacity-80">“{{ f.note }}”</p>{% endif %}
</li>
{% endmacro %}
{% if item.flags %}
<ul class="space-y-1 text-xs">{% for f in item.flags %}{{ flag_line(f, item, mode) }}{% endfor %}</ul>
{% endif %}
{% if item.ignored_flags %}
<details class="text-xs" data-shadow-flags>
<summary class="cursor-pointer opacity-60">{{ item.ignored_flags | length }} from shadowbanned flaggers (not counted)</summary>
<ul class="mt-1 space-y-1 opacity-70">{% for f in item.ignored_flags %}{{ flag_line(f, item, mode) }}{% endfor %}</ul>
</details>
{% endif %}
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
1.5 KiB · text
History
263b40b