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.

102 lines
3.9 KiB

Add Octicon SVG spritemap (#10107) * Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
4 years ago
  1. {{template "base/head" .}}
  2. <div class="repository settings">
  3. {{template "repo/header" .}}
  4. {{template "repo/settings/navbar" .}}
  5. <div class="ui container">
  6. {{template "base/alert" .}}
  7. <h4 class="ui top attached header">
  8. {{.i18n.Tr "repo.settings.deploy_keys"}}
  9. <div class="ui right">
  10. {{if not .DisableSSH}}
  11. <div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
  12. {{else}}
  13. <div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
  14. {{end}}
  15. </div>
  16. </h4>
  17. <div class="ui attached segment">
  18. {{if .Deploykeys}}
  19. <div class="ui key list">
  20. {{range .Deploykeys}}
  21. <div class="item">
  22. <div class="right floated content">
  23. <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  24. {{$.i18n.Tr "settings.delete_key"}}
  25. </button>
  26. </div>
  27. <div class="left floated content">
  28. <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i>
  29. </div>
  30. <div class="content">
  31. <strong>{{.Name}}</strong>
  32. <div class="print meta">
  33. {{.Fingerprint}}
  34. </div>
  35. <div class="activity meta">
  36. <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - <span>{{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}}</span></i>
  37. </div>
  38. </div>
  39. </div>
  40. {{end}}
  41. </div>
  42. {{else}}
  43. {{.i18n.Tr "repo.settings.no_deploy_keys"}}
  44. {{end}}
  45. </div>
  46. <br>
  47. <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
  48. <h4 class="ui top attached header">
  49. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  50. </h4>
  51. <div class="ui attached segment">
  52. <form class="ui form" action="{{.Link}}" method="post">
  53. {{.CsrfTokenHtml}}
  54. <div class="field">
  55. {{.i18n.Tr "repo.settings.deploy_key_desc"}}
  56. </div>
  57. <div class="field {{if .Err_Title}}error{{end}}">
  58. <label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
  59. <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
  60. </div>
  61. <div class="field {{if .Err_Content}}error{{end}}">
  62. <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
  63. <textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
  64. </div>
  65. <div class="field">
  66. <div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
  67. <input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1">
  68. <label for="is_writable">
  69. {{.i18n.Tr "repo.settings.is_writable"}}
  70. </label>
  71. <small style="padding-left: 26px;">{{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}}</small>
  72. </div>
  73. </div>
  74. <button class="ui green button">
  75. {{.i18n.Tr "repo.settings.add_deploy_key"}}
  76. </button>
  77. </form>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="ui small basic delete modal">
  83. <div class="ui icon header">
  84. <i class="trash icon"></i>
  85. {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
  86. </div>
  87. <div class="content">
  88. <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
  89. </div>
  90. <div class="actions">
  91. <div class="ui red basic inverted cancel button">
  92. <i class="remove icon"></i>
  93. {{.i18n.Tr "modal.no"}}
  94. </div>
  95. <div class="ui green basic inverted ok button">
  96. <i class="checkmark icon"></i>
  97. {{.i18n.Tr "modal.yes"}}
  98. </div>
  99. </div>
  100. </div>
  101. {{template "base/footer" .}}