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.

56 lines
1.7 KiB

  1. <h4 class="ui top attached header">
  2. {{.i18n.Tr "settings.u2f"}}
  3. </h4>
  4. <div class="ui attached segment">
  5. <p>{{.i18n.Tr "settings.u2f_desc" | Str2html}}</p>
  6. {{if .TwofaEnrolled}}
  7. <div class="ui key list">
  8. {{range .U2FRegistrations}}
  9. <div class="item">
  10. <div class="right floated content">
  11. <button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}">
  12. {{$.i18n.Tr "settings.delete_key"}}
  13. </button>
  14. </div>
  15. <div class="content">
  16. <strong>{{.Name}}</strong>
  17. </div>
  18. </div>
  19. {{end}}
  20. </div>
  21. <div class="ui form">
  22. {{.CsrfTokenHtml}}
  23. <div class="required field">
  24. <label for="nickname">{{.i18n.Tr "settings.u2f_nickname"}}</label>
  25. <input id="nickname" name="nickname" type="text" required>
  26. </div>
  27. <button id="register-security-key" class="positive ui labeled icon button"><i class="usb icon"></i>{{.i18n.Tr "settings.u2f_register_key"}}</button>
  28. </div>
  29. {{else}}
  30. <b>{{.i18n.Tr "settings.u2f_require_twofa"}}</b>
  31. {{end}}
  32. </div>
  33. <div class="ui small modal" id="register-device">
  34. <div class="header">{{.i18n.Tr "settings.u2f_register_key"}}</div>
  35. <div class="content">
  36. <i class="notched spinner loading icon"></i> {{.i18n.Tr "settings.u2f_press_button"}}
  37. </div>
  38. <div class="actions">
  39. <div class="ui cancel button">{{.i18n.Tr "cancel"}}</div>
  40. </div>
  41. </div>
  42. {{template "user/auth/u2f_error" .}}
  43. <div class="ui small basic delete modal" id="delete-registration">
  44. <div class="ui icon header">
  45. <i class="trash icon"></i>
  46. {{.i18n.Tr "settings.u2f_delete_key"}}
  47. </div>
  48. <div class="content">
  49. <p>{{.i18n.Tr "settings.u2f_delete_key_desc"}}</p>
  50. </div>
  51. {{template "base/delete_modal_actions" .}}
  52. </div>