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.

55 lines
3.5 KiB

  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="setting-wrapper" class="main-wrapper">
  4. <div id="user-profile-setting" class="container clear">
  5. {{template "user/settings/nav" .}}
  6. <div class="grid-4-5 left">
  7. <div class="setting-content">
  8. {{template "ng/base/alert" .}}
  9. <div id="setting-content">
  10. <div id="user-applications-panel" class="panel panel-radius">
  11. <div class="panel-header">
  12. <a class="show-form-btn" data-target-form="#access-add-form">
  13. <button class="btn btn-medium btn-black btn-radius right">{{.i18n.Tr "settings.generate_new_token"}}</button>
  14. </a>
  15. <strong>{{.i18n.Tr "settings.manage_access_token"}}</strong>
  16. </div>
  17. <ul class="panel-body setting-list">
  18. <li>{{.i18n.Tr "settings.tokens_desc"}}</li>
  19. {{range .Tokens}}
  20. <li class="ssh clear">
  21. <span class="active-icon left label label-{{if .HasRecentActivity}}green{{else}}gray{{end}} label-radius"></span>
  22. <i class="fa fa-send fa-2x left"></i>
  23. <div class="ssh-content left">
  24. <p><strong>{{.Name}}</strong></p>
  25. <p class="activity"><i>{{$.i18n.Tr "settings.add_on"}} <span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i>{{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{DateFmtShort .Updated}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i></p>
  26. </div>
  27. <a href="{{AppSubUrl}}/user/settings/applications?remove={{.Id}}">
  28. <button class="btn btn-small btn-red btn-radius ssh-btn right">{{$.i18n.Tr "settings.delete_token"}}</button>
  29. </a>
  30. </li>
  31. {{end}}
  32. </ul>
  33. </div>
  34. <br>
  35. <form class="panel panel-radius form form-align form-settings-add hide" id="access-add-form" action="{{AppSubUrl}}/user/settings/applications" method="post">
  36. {{.CsrfTokenHtml}}
  37. <p class="panel-header"><strong>{{.i18n.Tr "settings.generate_new_token"}}</strong></p>
  38. <div class="panel-body">
  39. <div class="text-center panel-desc">{{.i18n.Tr "settings.new_token_desc"}}</div>
  40. <input type="hidden" name="type" value="token">
  41. <p class="field">
  42. <label class="req" for="token-name">{{.i18n.Tr "settings.token_name"}}</label>
  43. <input class="ipt ipt-radius" id="token-name" name="name" required />
  44. </p>
  45. <p class="field">
  46. <label></label>
  47. <button class="btn btn-green btn-medium btn-radius" id="ssh-add-btn">{{.i18n.Tr "settings.generate_token"}}</button>
  48. </p>
  49. </div>
  50. </form>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. {{template "ng/base/footer" .}}