remotes/1693045480750635534/spooky-22
kek7198 2021-12-06 00:02:41 -06:00
parent b3c69d681c
commit 3ffed93b1b
2 changed files with 12 additions and 25 deletions

View File

@ -162,17 +162,19 @@
<li>
<hr class="mt-2 mb-1.5 border-t border-black h-1 shadow-inset-t-white-05"/>
</li>
<li id="approve-{{c.id}}" class="hidden {% if c.is_banned %}md:block{% endif %}">
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/unban_comment/{{c.id}}','remove-{{c.id}}','approve-{{c.id}}')">
<i class="fas fa-check fa-sm fa-fw mr-4"></i>Approve
</button>
</li>
{% if v.id != c.author.id %}
<li id="remove-{{c.id}}" class="hidden {% if not c.is_banned %}md:block{% endif %} text-red-600">
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/ban_comment/{{c.id}}','remove-{{c.id}}','approve-{{c.id}}')">
<i class="fas fa-ban fa-sm fa-fw mr-4"></i>Remove
</button>
</li>
{% endif %}
<li id="approve-{{c.id}}" class="hidden {% if c.is_banned %}md:block{% endif %}">
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/unban_comment/{{c.id}}','remove-{{c.id}}','approve-{{c.id}}')">
<i class="fas fa-check fa-sm fa-fw mr-4"></i>Approve
</button>
</li>
{% endif %}
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
<li>

View File

@ -173,35 +173,20 @@
{% endif %}
<!-- Requires admin and post has been reported -->
{% if v.admin_level >=3 %}
{% if "/reported/" in request.path %}
<!-- Requires non author -->
{% if v.id != p.author.id %}
<li>
<button class="list-inline-item text-red-600" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast('/ban_post/{{p.id}}')">
<i class="fas fa-ban"></i>Remove
</button>
</li>
{% endif %}
<li>
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast('/unban_post/{{p.id}}')">
<i class="fas fa-check fa-sm fa-fw mr-4"></i>Approve
</button>
</li>
{% else %}
<!-- Requires author -->
{% if v.id != p.author.id %}
<li class="{% if p.is_banned %}hidden{% endif %} text-red-600">
<button id="remove-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
<li id="remove-{{p.id}}" class="{% if p.is_banned %}hidden{% endif %} text-red-600">
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
<i class="fas fa-ban fa-sm fa-fw mr-4"></i>Remove
</button>
</li>
{% endif %}
<li class="{% if not p.is_banned %}hidden{% endif %}">
<button id="approve-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
<li id="approve-{{p.id}}" class="{% if not p.is_banned %}hidden{% endif %}">
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast3('/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
<i class="fas fa-check fa-sm fa-fw mr-4"></i>Approve
</button>
</li>
{% endif %}
{% endif %}
<!-- Requires admin or author -->
{% if v.id == p.author_id or v.admin_level >= 3 %}
<li class="{% if p.over_18 %}hidden{% endif %}">