mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -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;
|
||||
});
|
||||
})
|
||||
|
||||
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() {
|
||||
|
|
|
@ -210,6 +210,7 @@
|
|||
{% else %}
|
||||
<p class="text-center mt-4"><a href="https://liberapay.com/PieFed/donate">Donate with Liberapay</a></p>
|
||||
{% 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://codeberg.org/rimu/pyfedi">PieFed is free and open source</a></p>
|
||||
<p class="text-center"><a href="/privacy">Privacy policy</a></p>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
</div>
|
||||
{{ 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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{{ shorten_number(post.up_votes) }}
|
||||
</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>
|
||||
{{ shorten_number(post.down_votes) }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue