mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
no voting buttons on user profiles - stop downvote abuse
This commit is contained in:
parent
79359d17ad
commit
cac38e66ba
2 changed files with 3 additions and 11 deletions
|
@ -8,9 +8,11 @@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row main_row">
|
<div class="row main_row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
{% if not hide_vote_buttons %}
|
||||||
<div class="voting_buttons" aria-hidden="true">
|
<div class="voting_buttons" aria-hidden="true">
|
||||||
{% include "post/_post_voting_buttons.html" %}
|
{% include "post/_post_voting_buttons.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% if post.image_id %}
|
{% if post.image_id %}
|
||||||
<div class="thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
|
<div class="thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
|
||||||
{% if low_bandwidth %}
|
{% if low_bandwidth %}
|
||||||
|
|
|
@ -79,23 +79,13 @@ def show_profile(user):
|
||||||
replies_prev_url = url_for('activitypub.user_profile', actor=user.ap_id if user.ap_id is not None else user.user_name,
|
replies_prev_url = url_for('activitypub.user_profile', actor=user.ap_id if user.ap_id is not None else user.user_name,
|
||||||
replies_page=post_replies.prev_num) if post_replies.has_prev and replies_page != 1 else None
|
replies_page=post_replies.prev_num) if post_replies.has_prev and replies_page != 1 else None
|
||||||
|
|
||||||
# Voting history
|
|
||||||
if current_user.is_authenticated:
|
|
||||||
recently_upvoted = recently_upvoted_posts(current_user.id)
|
|
||||||
recently_downvoted = recently_downvoted_posts(current_user.id)
|
|
||||||
else:
|
|
||||||
recently_upvoted = []
|
|
||||||
recently_downvoted = []
|
|
||||||
|
|
||||||
return render_template('user/show_profile.html', user=user, posts=posts, post_replies=post_replies,
|
return render_template('user/show_profile.html', user=user, posts=posts, post_replies=post_replies,
|
||||||
moderates=moderates.all(), canonical=canonical, title=_('Posts by %(user_name)s',
|
moderates=moderates.all(), canonical=canonical, title=_('Posts by %(user_name)s',
|
||||||
user_name=user.user_name),
|
user_name=user.user_name),
|
||||||
description=description, subscribed=subscribed, upvoted=upvoted,
|
description=description, subscribed=subscribed, upvoted=upvoted,
|
||||||
post_next_url=post_next_url, post_prev_url=post_prev_url,
|
post_next_url=post_next_url, post_prev_url=post_prev_url,
|
||||||
replies_next_url=replies_next_url, replies_prev_url=replies_prev_url,
|
replies_next_url=replies_next_url, replies_prev_url=replies_prev_url,
|
||||||
recently_upvoted=recently_upvoted,
|
noindex=not user.indexable, show_post_community=True, hide_vote_buttons=True,
|
||||||
recently_downvoted=recently_downvoted,
|
|
||||||
noindex=not user.indexable, show_post_community=True,
|
|
||||||
moderating_communities=moderating_communities(current_user.get_id()),
|
moderating_communities=moderating_communities(current_user.get_id()),
|
||||||
joined_communities=joined_communities(current_user.get_id())
|
joined_communities=joined_communities(current_user.get_id())
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue