mirror of
https://gitlab.com/brutaldon/brutaldon.git
synced 2024-12-04 14:46:24 -05:00
Template changes for user actions
This commit is contained in:
parent
6952c34aac
commit
51f26e2b25
@ -60,6 +60,12 @@ article.media.user-info .content img
|
|||||||
max-width: 1.5rem;
|
max-width: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.account-locked
|
||||||
|
{
|
||||||
|
margin-top: 48px;
|
||||||
|
margin-left: -16px;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.media {
|
.media {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -22,6 +22,11 @@ Brutaldon - {{ timeline }} timelime
|
|||||||
</div>
|
</div>
|
||||||
<figure class="image is-96x96 card-header-icon">
|
<figure class="image is-96x96 card-header-icon">
|
||||||
<img src="{{ user.avatar }}" alt="Avatar">
|
<img src="{{ user.avatar }}" alt="Avatar">
|
||||||
|
{% if user.locked %}
|
||||||
|
<span class="fa fa-lock account-locked">
|
||||||
|
<span class="is-hidden">Private</span>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -30,20 +35,50 @@ Brutaldon - {{ timeline }} timelime
|
|||||||
</div>
|
</div>
|
||||||
<div class="level">
|
<div class="level">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
<a class="level-item fa fa-user-plus" title="follow">
|
{% if relationship.requested %}
|
||||||
<span class="is-hidden">Follow</span>
|
<a class="level-item fa fa-hourglass" title="cancel request"
|
||||||
</a>
|
href="{% url 'follow' user.id %}">
|
||||||
<a class="level-item fa fa-social-home" title="home">
|
<span class="is-hidden">Cancel request</span>
|
||||||
|
</a>
|
||||||
|
{% elif not relationship.following %}
|
||||||
|
<a class="level-item fa fa-user-plus" title="follow"
|
||||||
|
href="{% url 'follow' user.id %}">
|
||||||
|
<span class="is-hidden">Follow</span>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="level-item fa fa-user-times" title="unfollow"
|
||||||
|
href="{% url 'follow' user.id %}">
|
||||||
|
<span class="is-hidden">Unfollow</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="level-item fa fa-social-home"
|
||||||
|
href="{{ user.url }}" title="home">
|
||||||
<span class="is-hidden">View on home site</span>
|
<span class="is-hidden">View on home site</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
<a class="level-item fa fa-volume-off" title="mute">
|
{% if not relationship.muting %}
|
||||||
<span class="is-hidden">Mute</span>
|
<a class="level-item fa fa-volume-off" title="mute"
|
||||||
</a>
|
href="{% url 'mute' user.id %}">
|
||||||
<a class="level-item fa fa-ban" title="block">
|
<span class="is-hidden">Mute</span>
|
||||||
<span class="is-hidden">Block</span>
|
</a>
|
||||||
</a>
|
{% else %}
|
||||||
|
<a class="level-item fa fa-volume-up" title="unmute"
|
||||||
|
href="{% url 'mute' user.id %}">
|
||||||
|
<span class="is-hidden">Unmute</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if not relationship.blocking %}
|
||||||
|
<a class="level-item fa fa-ban" title="block"
|
||||||
|
href="{% url 'block' user.id %}">
|
||||||
|
<span class="is-hidden">Block</span>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="level-item fa fa-circle-o" title="unblock"
|
||||||
|
href="{% url 'block' user.id %}">
|
||||||
|
<span class="is-hidden">Unblock</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -268,8 +268,10 @@ def user(request, username):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
raise Http404("The user %s could not be found." % username)
|
raise Http404("The user %s could not be found." % username)
|
||||||
data = mastodon.account_statuses(user_dict.id)
|
data = mastodon.account_statuses(user_dict.id)
|
||||||
|
relationship = mastodon.account_relationships(user_dict.id)[0]
|
||||||
return render(request, 'main/user.html',
|
return render(request, 'main/user.html',
|
||||||
{'toots': data, 'user': user_dict,
|
{'toots': data, 'user': user_dict,
|
||||||
|
'relationship': relationship,
|
||||||
'own_username': request.session['user'].acct,
|
'own_username': request.session['user'].acct,
|
||||||
'fullbrutalism': fullbrutalism_p(request)})
|
'fullbrutalism': fullbrutalism_p(request)})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user