show the votes button to logged-out niggas
parent
59e0beebb2
commit
2258b18566
|
@ -225,7 +225,6 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'HOLE_CREATE': 0,
|
||||
'EDIT_RULES': 3,
|
||||
'FLAGS_REMOVE': 2,
|
||||
'VOTES_VISIBLE': 0,
|
||||
'USER_BLOCKS_VISIBLE': 0,
|
||||
'USER_FOLLOWS_VISIBLE': 0,
|
||||
'USER_VOTERS_VISIBLE': 0,
|
||||
|
|
|
@ -6,7 +6,7 @@ from files.__main__ import app, limiter
|
|||
|
||||
|
||||
@app.get("/votes/<link>")
|
||||
@admin_level_required(PERMS['VOTES_VISIBLE'])
|
||||
@auth_required
|
||||
def vote_info_get(v, link):
|
||||
try:
|
||||
if "p_" in link: thing = get_post(int(link.split("p_")[1]), v=v)
|
||||
|
|
|
@ -397,7 +397,9 @@
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if v and ((not c.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}<a href="/votes/{{c.fullname}}" class="btn caction nobackground px-1 text-muted"><i class="fas fa-arrows-v"></i>Votes</a>{% endif %}
|
||||
{% if not c.ghost or (v and v.id == AEVANN_ID) %}
|
||||
<a href="/votes/{{c.fullname}}" class="btn caction nobackground px-1 text-muted"><i class="fas fa-arrows-v"></i>Votes</a>
|
||||
{% endif %}
|
||||
|
||||
<a class="btn caction nobackground px-1 text-muted" href="{{c.permalink}}"><i class="fas fa-book-open"></i>Context</a>
|
||||
|
||||
|
@ -581,7 +583,9 @@
|
|||
<div class="modal-body">
|
||||
<ul class="list-group comment-actions">
|
||||
|
||||
{% if v and ((not c.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}<a href="/votes/{{c.fullname}}"><li class="list-group-item"><i class="fas fa-arrows-v mr-2"></i>Votes</li></a>{% endif %}
|
||||
{% if not c.ghost or (v and v.id == AEVANN_ID) %}
|
||||
<a href="/votes/{{c.fullname}}"><li class="list-group-item"><i class="fas fa-arrows-v mr-2"></i>Votes</li></a>
|
||||
{% endif %}
|
||||
|
||||
<a class="list-group-item" href="{{c.permalink}}"><i class="fas fa-book-open mr-2"></i>Context</a>
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
{% endif %}
|
||||
|
||||
|
||||
{% if v and ((not p.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}<a class="list-inline-item" href="/votes/{{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>{% endif %}
|
||||
{% if not p.ghost or (v and v.id == AEVANN_ID) %}
|
||||
<a class="list-inline-item" href="/votes/{{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>
|
||||
{% endif %}
|
||||
|
||||
{% if v and FEATURES['AWARDS'] %}
|
||||
<button type="button" class="list-inline-item text-muted d-none d-md-inline-block" data-bs-toggle="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' onclick="document.getElementById('giveaward').dataset.action = this.dataset.url"><i class="fas fa-gift fa-fw"></i>Give Award</button>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{% endif %}
|
||||
|
||||
|
||||
{% if v and ((not p.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}
|
||||
{% if not p.ghost or (v and v.id == AEVANN_ID) %}
|
||||
<a class="nobackground btn btn-link btn-block btn-lg text-left text-muted" href="/votes/{{p.fullname}}">
|
||||
<i class="fas fa-arrows-v text-center text-muted mr-2"></i>Votes
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue