More accurate button display

Now, a follow button will show as pending even if the user doesn't
manually approve followers, if that's the state the request is in.
This commit is contained in:
Mouse Reeve 2022-07-09 12:19:28 -07:00
parent ed847494ab
commit 923495e454

View file

@ -26,7 +26,7 @@
<form action="{% url 'unfollow' %}" method="POST" class="interaction follow_{{ user.id }} {% if not relationship.is_following and not relationship.is_follow_pending %}is-hidden{%endif %}" data-id="follow_{{ user.id }}"> <form action="{% url 'unfollow' %}" method="POST" class="interaction follow_{{ user.id }} {% if not relationship.is_following and not relationship.is_follow_pending %}is-hidden{%endif %}" data-id="follow_{{ user.id }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}"> <input type="hidden" name="user" value="{{ user.username }}">
{% if user.manually_approves_followers and not relationship.is_following %} {% if relationship.is_follow_pending %}
<button class="button is-small is-danger is-light" type="submit"> <button class="button is-small is-danger is-light" type="submit">
{% trans "Undo follow request" %} {% trans "Undo follow request" %}
</button> </button>