# Conflicts: # cps/helper.py # cps/static/js/archive/unrar.js # cps/templates/readcbr.html # cps/templates/readpdf.html # cps/translations/de/LC_MESSAGES/messages.mo # cps/translations/de/LC_MESSAGES/messages.po # cps/translations/es/LC_MESSAGES/messages.mo # cps/translations/es/LC_MESSAGES/messages.po # cps/translations/fr/LC_MESSAGES/messages.mo # cps/translations/fr/LC_MESSAGES/messages.po # cps/translations/it/LC_MESSAGES/messages.mo # cps/translations/it/LC_MESSAGES/messages.po # cps/translations/ja/LC_MESSAGES/messages.mo # cps/translations/ja/LC_MESSAGES/messages.po # cps/translations/km/LC_MESSAGES/messages.mo # cps/translations/km/LC_MESSAGES/messages.po # cps/translations/nl/LC_MESSAGES/messages.mo # cps/translations/nl/LC_MESSAGES/messages.po # cps/translations/pl/LC_MESSAGES/messages.mo # cps/translations/pl/LC_MESSAGES/messages.po # cps/translations/ru/LC_MESSAGES/messages.mo # cps/translations/ru/LC_MESSAGES/messages.po # cps/translations/sv/LC_MESSAGES/messages.mo # cps/translations/sv/LC_MESSAGES/messages.po # cps/translations/uk/LC_MESSAGES/messages.mo # cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo # cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po # cps/web.py # messages.pot # optional-requirements.txt
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% extends "layout.html" %}
 | 
						|
{% block body %}
 | 
						|
<div class="well">
 | 
						|
  <h2 style="margin-top: 0">{{_('Remote login')}}</h2>
 | 
						|
  <p>
 | 
						|
    {{_('Use your other device, login and visit ')}} <a href="{{verify_url}}">{{verify_url}}</a>.
 | 
						|
  </p>
 | 
						|
  <p>
 | 
						|
    {{_('Once you do so, you will automatically get logged in on this device.')}}
 | 
						|
  </p>
 | 
						|
  <p>
 | 
						|
    {{_('The link will expire after 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 %}
 |