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

keys_ssh.tmpl 3.1 kB

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>
5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <h4 class="ui top attached header">
  2. {{.i18n.Tr "settings.manage_ssh_keys"}}
  3. <div class="ui right">
  4. {{if not .DisableSSH}}
  5. <div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
  6. {{else}}
  7. <div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
  8. {{end}}
  9. </div>
  10. </h4>
  11. <div class="ui attached segment">
  12. <div class="ui key list">
  13. <div class="item">
  14. {{.i18n.Tr "settings.ssh_desc"}}
  15. </div>
  16. {{range .Keys}}
  17. <div class="item">
  18. <div class="right floated content">
  19. <button class="ui red tiny button delete-button" id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}">
  20. {{$.i18n.Tr "settings.delete_key"}}
  21. </button>
  22. </div>
  23. <div class="left floated content">
  24. <span class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}>{{svg "octicon-key" 32}}</span>
  25. </div>
  26. <div class="content">
  27. <strong>{{.Name}}</strong>
  28. <div class="print meta">
  29. {{.Fingerprint}}
  30. </div>
  31. <div class="activity meta">
  32. <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
  33. </div>
  34. </div>
  35. </div>
  36. {{end}}
  37. </div>
  38. </div>
  39. <br>
  40. <p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
  41. <div {{if not .HasSSHError}}class="hide"{{end}} id="add-ssh-key-panel">
  42. <h4 class="ui top attached header">
  43. {{.i18n.Tr "settings.add_new_key"}}
  44. </h4>
  45. <div class="ui attached segment">
  46. <form class="ui form" action="{{.Link}}" method="post">
  47. {{.CsrfTokenHtml}}
  48. <div class="field {{if .Err_Title}}error{{end}}">
  49. <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
  50. <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
  51. </div>
  52. <div class="field {{if .Err_Content}}error{{end}}">
  53. <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
  54. <textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
  55. </div>
  56. <input name="type" type="hidden" value="ssh">
  57. <button class="ui green button">
  58. {{.i18n.Tr "settings.add_key"}}
  59. </button>
  60. </form>
  61. </div>
  62. </div>
  63. <div class="ui small basic delete modal" id="delete-ssh">
  64. <div class="ui icon header">
  65. <i class="trash icon"></i>
  66. {{.i18n.Tr "settings.ssh_key_deletion"}}
  67. </div>
  68. <div class="content">
  69. <p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
  70. </div>
  71. {{template "base/delete_modal_actions" .}}
  72. </div>