1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-06 10:06:21 +00:00
calibre-web/cps/templates/remote_login.html
Josh O'Brien 9b49125776 English Language Updates
Changes to provide consistency for English language.
2020-02-03 14:22:00 +11:00

42 lines
1.1 KiB
HTML

{% extends "layout.html" %}
{% block body %}
<div class="well">
<h2 style="margin-top: 0">{{_('Magic Link - Authorise New Device')}}</h2>
<p>
{{_('On another device, login and visit:')}}
<h4><a href="{{verify_url}}">{{verify_url}}</a></b>
</h4>
<p>
{{_('Once verified, you will automatically be logged in on this device.')}}
</p>
<p>
{{_('This verification link will expire in 10 minutes.')}}
</p>
</div>
{% endblock %}
{% block js %}
<script type="text/javascript">
(function () {
// Poll the server to check if the user has authenticated
var t = setInterval(function () {
$.post('{{url_for("web.token_verified")}}', { token: '{{token}}' })
.done(function(response) {
if (response.status === 'success') {
// Wait a tick so cookies are updated
setTimeout(function () {
window.location.href = '{{url_for("web.index")}}';
}, 0);
}
})
.fail(function (xhr) {
clearInterval(t);
var response = JSON.parse(xhr.responseText);
alert(response.message);
});
}, 5000);
})()
</script>
{% endblock %}