diff --git a/files/assets/css/main.css b/files/assets/css/main.css index c43ec3ec5..b44e8ef09 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -7246,7 +7246,7 @@ button, .btn { } } -[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled { +[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled, .disabled:before { color: #6c757d !important; pointer-events: none !important; cursor: default !important; diff --git a/files/assets/css/themes/dark.css b/files/assets/css/themes/dark.css index f54472dc9..f1d9c30f6 100644 --- a/files/assets/css/themes/dark.css +++ b/files/assets/css/themes/dark.css @@ -97,7 +97,7 @@ pre { color: #7a7a7a !important; } -[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled { +[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled, .disabled:before { color: #bbb !important; } diff --git a/files/assets/css/themes/midnight.css b/files/assets/css/themes/midnight.css index b5191e78b..feab8d1a0 100644 --- a/files/assets/css/themes/midnight.css +++ b/files/assets/css/themes/midnight.css @@ -64,7 +64,7 @@ body, .navbar-light, .navbar-dark, .card, .modal-content, .comment-write textare border: 1px var(--gray-500) solid; } -[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled { +[disabled], .disabled, button[disabled], .btn[disabled], button.disabled, .btn.disabled, .disabled:before { color: #858b91 !important; } diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index d935ce8b4..dd9444555 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -336,7 +336,7 @@ PERMS = { # Minimum admin_level to perform action. 'VIEW_ACTIVE_USERS': 1, 'VIEW_ALT_VOTES': 1, 'VIEW_LAST_ACTIVE': 1, - 'VIEW_VOTE_BUTTONS_ON_USER_PAGE': 1, + 'ENABLE_VOTE_BUTTONS_ON_USER_PAGE': 1, 'NOTIFICATIONS_HOLE_INACTIVITY_DELETION': 1, 'NOTIFICATIONS_HOLE_CREATION': 1, 'NOTIFICATIONS_MODERATOR_ACTIONS': 1, diff --git a/files/templates/comments.html b/files/templates/comments.html index c66de01ca..fdf4be576 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -11,6 +11,8 @@ {% include "popover.html" %} {% endif %} +{% set disable_votes = (request.path.startswith('/@') and not wall) and v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %} + {% macro single_comment(c, level=1, collapse=False) %} {% if can_see(v, c) %} @@ -308,27 +310,14 @@ - {% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS['VIEW_VOTE_BUTTONS_ON_USER_PAGE'] %} + {% if v %}
  • - {% if voted == 1 %} - - {% endif %} + + {{score}} - {% if voted == -1 %} - - {% endif %} -
  • - {% elif v %} -
  • - - - - - {{score}} - - +
  • @@ -350,13 +339,8 @@