mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
redirect to login form as needed
This commit is contained in:
parent
66f621049a
commit
f140d0369e
4 changed files with 14 additions and 4 deletions
|
@ -151,6 +151,15 @@ function setupConfirmFirst() {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const redirect_login = document.querySelectorAll('.redirect_login');
|
||||||
|
redirect_login.forEach(element => {
|
||||||
|
element.addEventListener("click", function(event) {
|
||||||
|
location.href = '/auth/login';
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupSubmitOnInputChange() {
|
function setupSubmitOnInputChange() {
|
||||||
|
|
|
@ -210,6 +210,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-center mt-4"><a href="https://liberapay.com/PieFed/donate">Donate with Liberapay</a></p>
|
<p class="text-center mt-4"><a href="https://liberapay.com/PieFed/donate">Donate with Liberapay</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<p class="text-center"><a href="/keyboard_shortcuts">{{ _('Keyboard shortcuts') }}</a></p>
|
||||||
<p class="text-center"><a href="https://patreon.com/PieFed">Donate with Patreon</a></p>
|
<p class="text-center"><a href="https://patreon.com/PieFed">Donate with Patreon</a></p>
|
||||||
<p class="text-center"><a href="https://codeberg.org/rimu/pyfedi">PieFed is free and open source</a></p>
|
<p class="text-center"><a href="https://codeberg.org/rimu/pyfedi">PieFed is free and open source</a></p>
|
||||||
<p class="text-center"><a href="/privacy">Privacy policy</a></p>
|
<p class="text-center"><a href="/privacy">Privacy policy</a></p>
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}">
|
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }} redirect_login">
|
||||||
<span class="fe fe-arrow-up"></span>
|
<span class="fe fe-arrow-up"></span>
|
||||||
</div>
|
</div>
|
||||||
{{ comment.up_votes - comment.down_votes }}
|
{{ comment.up_votes - comment.down_votes }}
|
||||||
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }}">
|
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }} redirect_login">
|
||||||
<span class="fe fe-arrow-down"></span>
|
<span class="fe fe-arrow-down"></span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="upvote_button digits_{{ digits(post.up_votes) }} {{ upvoted_class }}">
|
<div class="upvote_button digits_{{ digits(post.up_votes) }} {{ upvoted_class }} redirect_login">
|
||||||
<span class="fe fe-arrow-up"></span>
|
<span class="fe fe-arrow-up"></span>
|
||||||
{{ shorten_number(post.up_votes) }}
|
{{ shorten_number(post.up_votes) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="downvote_button digits_{{ digits(post.down_votes) }} {{ downvoted_class }}">
|
<div class="downvote_button digits_{{ digits(post.down_votes) }} {{ downvoted_class }} redirect_login">
|
||||||
<span class="fe fe-arrow-down"></span>
|
<span class="fe fe-arrow-down"></span>
|
||||||
{{ shorten_number(post.down_votes) }}
|
{{ shorten_number(post.down_votes) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue