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.

65 lines
3.9 KiB

  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div id="gogs-body" class="container">
  4. <div id="gogs-user-setting-nav" class="col-md-3">
  5. <h4>Account Setting</h4>
  6. <ul class="list-group">
  7. <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
  8. <li class="list-group-item"><a href="#">Emails and Password</a></li>
  9. <li class="list-group-item"><a href="#">Notifications</a></li>
  10. <li class="list-group-item list-group-item-success"><a href="/user/setting/ssh/">SSH Keys</a></li>
  11. <li class="list-group-item"><a href="#">Security</a></li>
  12. <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
  13. </ul>
  14. </div>
  15. <div id="gogs-user-setting-container" class="col-md-9">
  16. <div id="gogs-ssh-keys">
  17. <h4>SSH Keys</h4>{{if .AddSSHKeySuccess}}
  18. <p class="alert alert-success">New SSH Key has been added !</p>{{else if .HasError}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}}
  19. <ul id="gogs-ssh-keys-list" class="list-group">
  20. <li class="list-group-item"><span class="name">SSH Key's name</span></li>{{range .Keys}}
  21. <li class="list-group-item">
  22. <span class="name">{{.Name}}</span>
  23. <span class="print">(print code)</span>
  24. <a href="#" class="btn btn-link btn-danger right delete" rel="{{.Id}}" data-del="{{.Id}}">Delete</a>
  25. </li>{{end}}
  26. <li class="list-group-item">
  27. <a class="btn btn-link btn-primary" href="#ssh-add-modal" id="gogs-ssh-add" data-toggle="modal">Add SSH Key</a>
  28. </li>
  29. </ul>
  30. <div class="modal fade" id="ssh-add-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  31. <div class="modal-dialog">
  32. <form class="modal-content form-horizontal" id="gogs-ssh-form" method="post" action="/user/setting/ssh/">
  33. <div class="modal-header">
  34. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  35. <h4 class="modal-title" id="myModalLabel">Add SSH Key</h4>
  36. </div>
  37. <div class="modal-body">
  38. <div class="form-group">
  39. <label class="col-md-3 control-label">The name of key<strong class="text-danger">*</strong></label>
  40. <div class="col-md-8">
  41. <input name="keyname" class="form-control" placeholder="Type your preferred name" required="required">
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-md-3 control-label">SSH Key<strong class="text-danger">*</strong></label>
  46. <div class="col-md-8">
  47. <textarea name="key_content" class="form-control" placeholder="Type your key content" required="required"></textarea>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="modal-footer">
  52. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  53. <button type="submit" class="btn btn-primary">Save SSH Key</button>
  54. </div>
  55. </form>
  56. </div>
  57. </div>
  58. <p><strong>Need help?</strong> Check out the guide to <a href="https://help.github.com/articles/generating-ssh-keys" target="_blank">generating SSH keys</a> or troubleshoot <a href="https://help.github.com/ssh-issues/" target="_blank">common SSH Problems</a></p>
  59. </div>
  60. </div>
  61. </div>
  62. {{template "base/footer" .}}