add: nsfw marker for posts/communities

This commit is contained in:
trisua 2025-04-07 16:32:09 -04:00
parent f83cfa3756
commit 51534fbd52
8 changed files with 49 additions and 7 deletions

View file

@ -16,13 +16,26 @@
community=community, size="72px") }}
<div class="flex flex-col">
<div class="flex gap-2 items-center">
<h3 id="title" class="title name shorter">
<h3
id="title"
class="title name shorter flex gap-2"
>
<!-- prettier-ignore -->
{% if community.context.display_name %}
{{ community.context.display_name }}
{% else %}
{{ community.title }}
{% endif %}
{% if community.context.is_nsfw %}
<span
title="NSFW community"
class="flex items-center"
style="color: var(--color-primary)"
>
{{ icon "square-asterisk" }}
</span>
{% endif %}
</h3>
{% if user %} {% if user.id != community.owner

View file

@ -116,6 +116,11 @@
"{{ post.context.comments_enabled }}",
"checkbox",
],
[
["is_nsfw", "Mark as NSFW"],
"{{ community.context.is_nsfw }}",
"checkbox",
],
];
if (can_manage_pins) {

View file

@ -548,6 +548,11 @@
"{{ community.context.description }}",
"textarea",
],
[
["is_nsfw", "Mark as NSFW"],
"{{ community.context.is_nsfw }}",
"checkbox",
],
],
settings,
);