mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-23 14:00:28 +00:00
f150a3eee9
Fixes #454
78 lines
4.1 KiB
HTML
78 lines
4.1 KiB
HTML
<div class="inline follow-profile {% if inbound_follow %}has-reverse{% endif %}">
|
|
<div class="actions" role="menubar">
|
|
{% if request.identity == identity %}
|
|
<a href="{% url "settings_profile" %}" class="button" title="Edit Profile">
|
|
<i class="fa-solid fa-user-edit"></i> Edit
|
|
</a>
|
|
{% elif not inbound_block %}
|
|
{% if inbound_follow or outbound_mute %}
|
|
<span class="reverse-follow">
|
|
{% if inbound_follow %}Follows You{% endif %}{% if inbound_follow and outbound_mute %},{% endif %}
|
|
{% if outbound_mute %}Muted{% endif %}
|
|
</span>
|
|
{% endif %}
|
|
<form action="{{ identity.urls.action }}" method="POST" class="inline-menu">
|
|
{% csrf_token %}
|
|
{% if outbound_block %}
|
|
<input type="hidden" name="action" value="unblock">
|
|
<button class="destructive" title="Unblock"><i class="fa-solid fa-ban"></i>
|
|
Unblock
|
|
</button>
|
|
{% elif outbound_follow %}
|
|
<input type="hidden" name="action" value="unfollow">
|
|
<button class="destructive" title="Unfollow"><i class="fa-solid fa-user-minus"></i>
|
|
{% if outbound_follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
|
|
</button>
|
|
{% else %}
|
|
<input type="hidden" name="action" value="follow">
|
|
<button><i class="fa-solid fa-user-plus"></i> Follow</button>
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
<a title="Menu" class="menu button" _="on click or keyup[key is 'Enter'] toggle .enabled on the next <menu/> then halt" aria-haspopup="menu" tabindex="0">
|
|
<i class="fa-solid fa-bars"></i>
|
|
</a>
|
|
<menu>
|
|
{% if outbound_follow %}
|
|
<form action="{{ identity.urls.action }}" method="POST" class="inline">
|
|
{% csrf_token %}
|
|
{% if outbound_follow.boosts %}
|
|
<input type="hidden" name="action" value="hide_boosts">
|
|
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Hide boosts</button>
|
|
{% else %}
|
|
<input type="hidden" name="action" value="show_boosts">
|
|
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Show boosts</button>
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
{% if request.identity != identity and not outbound_block %}
|
|
<form action="{{ identity.urls.action }}" method="POST" class="inline">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="action" value="block">
|
|
<button role="menuitem"><i class="fa-solid fa-ban"></i> Block user</button>
|
|
</form>
|
|
{% if outbound_mute %}
|
|
<form action="{{ identity.urls.action }}" method="POST" class="inline">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="action" value="unmute">
|
|
<button role="menuitem"><i class="fa-solid fa-comment-slash"></i> Unmute user</button>
|
|
</form>
|
|
{% else %}
|
|
<form action="{{ identity.urls.action }}" method="POST" class="inline">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="action" value="mute">
|
|
<button role="menuitem"><i class="fa-solid fa-comment-slash"></i> Mute user</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if request.user.admin %}
|
|
<a href="{{ identity.urls.admin_edit }}" role="menuitem">
|
|
<i class="fa-solid fa-user-gear"></i> View in Admin
|
|
</a>
|
|
<a href="{{ identity.urls.djadmin_edit }}" role="menuitem">
|
|
<i class="fa-solid fa-gear"></i> View in djadmin
|
|
</a>
|
|
{% endif %}
|
|
</menu>
|
|
</div>
|
|
</div>
|