add: show if user account is banned on profile

fix: check post owner privacy settings on community pages
This commit is contained in:
trisua 2025-05-16 00:25:44 -04:00
parent 03b252937b
commit 4c26879d00
9 changed files with 112 additions and 14 deletions

View file

@ -236,6 +236,8 @@
MANAGE_MESSAGES: 1 << 23,
MANAGE_UPLOADS: 1 << 24,
MANAGE_EMOJIS: 1 << 25,
MANAGE_STACKS: 1 << 26,
STAFF_BADGE: 1 << 27,
},
],
);

View file

@ -0,0 +1,27 @@
{% extends "root.html" %} {% block head %}
<title>{{ profile.username }} (banned) - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card small flex items-center justify-between gap-2">
<div class="flex items-center gap-2">
{{ components::avatar(username=profile.username, size="24px") }}
<span>{{ profile.username }}</span>
</div>
<b class="notification chip">{{ text "auth:label.banned" }}</b>
</div>
<div class="card flex flex-col gap-2">
<span>{{ text "auth:label.banned_message" }}</span>
<div class="card w-full secondary flex gap-2">
<a href="/" class="button red quaternary">
{{ icon "x" }}
<span>{{ text "general:action.back" }}</span>
</a>
</div>
</div>
</div>
</main>
{% endblock %}

View file

@ -47,7 +47,7 @@
}}
<div class="flex flex-col">
<!-- prettier-ignore -->
<h3 id="username" class="username flex items-center gap-2">
<h3 id="username" class="username flex items-center gap-2 flex-wrap w-full">
<span class="name shorter">{{ components::username(user=profile) }}</span>
{% if profile.is_verified %}
@ -56,11 +56,17 @@
</span>
{% endif %}
{% if is_supporter %}
{% if profile.permissions|has_supporter %}
<span title="Supporter" style="color: var(--color-primary);" class="flex items-center">
{{ icon "star" }}
</span>
{% endif %}
{% if profile.permissions|has_staff_badge %}
<span title="Staff" style="color: var(--color-primary);" class="flex items-center">
{{ icon "shield-user" }}
</span>
{% endif %}
</h3>
<span class="fade">{{ profile.username }}</span>