You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
925B

  1. <div class="narrow">
  2. <div class="jumbotron">
  3. <h3>Device Code</h3>
  4. <p id="device-message">If you are prompted to log in on a device, click the button below to generate a device code.</p>
  5. <div id="device-code">
  6. <input type="button" class="btn btn-primary" value="Generate Device Code" id="generate-code">
  7. </div>
  8. </div>
  9. </div>
  10. <style type="text/css">
  11. .screenshot {
  12. -webkit-border-radius: 6px;
  13. -moz-border-radius: 6px;
  14. border-radius: 6px;
  15. }
  16. </style>
  17. <script>
  18. $(function(){
  19. $("#generate-code").click(function(){
  20. $.post("/settings/device-code", {
  21. generate: 1
  22. }, function(response){
  23. $("#device-code").html('<h3>'+response.code+'</h3>');
  24. $("#device-message").html('Enter the code below on the device in order to sign in. This code is valid for 5 minutes.');
  25. setTimeout(function(){
  26. window.location.reload();
  27. }, 1000*300);
  28. });
  29. });
  30. })
  31. </script>