view vote buttons on user page

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-10-06 01:14:32 -07:00
parent 8bed8c64e8
commit 397cf68abd
3 changed files with 6 additions and 10 deletions

View File

@ -172,6 +172,7 @@ PERMS = { # Minimum admin_level to perform action.
'VIEW_ALT_VOTES': 2,
'VIEW_LAST_ACTIVE': 2,
'VIEW_PATRONS': 3, # note: extra check for Aevann, carp, or snakes
'VIEW_VOTE_BUTTONS_ON_USER_PAGE': 2,
'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, # note: explicitly disabled on rDrama
'SITE_SETTINGS': 3,
'SITE_SETTINGS_SIDEBARS_BANNERS_BADGES': 3,
@ -187,12 +188,7 @@ PERMS = { # Minimum admin_level to perform action.
'MESSAGE_BLOCKED_USERS': 1,
'APPS_MODERATION': 3,
'STREAMERS_MODERATION': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM1': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM2': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM3': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM4': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM5': 2,
'UNKNOWN_ADMIN_LEVEL2_PERM6': 2,
}
FEATURES = {

View File

@ -315,7 +315,7 @@
</a>
</li>
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM1'] %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
<li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
{% if voted==1 %}
<span class="mr-2 arrow-up comment-{{c.id}}-up active"></span>
@ -366,7 +366,7 @@
<ul class="d-none d-md-flex list-inline text-right text-md-left"><li>
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM2'] %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
{% if voted==1 %}
<button class="btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active"></button>
{% endif %}
@ -383,7 +383,7 @@
<span data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}" class="comment-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if c.controversial %} controversial{% endif %}">{{score}}</span>
</button>
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM3'] %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
{% if voted==-1 %}
<li class=" arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active"></li>
{% endif %}

View File

@ -48,7 +48,7 @@
{% if not postembed %}
<div class="voting my-2 d-none d-md-flex pr-2">
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM5'] %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></div>
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
@ -245,7 +245,7 @@
</li>
{% endif %}
{% if not postembed %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM6'] %}
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></span>