Skip to content

Commit 0c1dc78

Browse files
committed
Added copy commit SHA1 button in commits list
Fixes #13816 Signed-off-by: Vangelis <[email protected]>
1 parent 118aedd commit 0c1dc78

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

options/locale/locale_en-US.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ commits.search.tooltip = You can prefix keywords with "author:", "committer:", "
898898
commits.find = Search
899899
commits.search_all = All Branches
900900
commits.author = Author
901+
commits.copy_sha = Copy
902+
commits.copy_sha_success = SHA1 has been copied
903+
commits.copy_sha_error = Use ⌘C or Ctrl-C to copy
901904
commits.message = Message
902905
commits.date = Date
903906
commits.older = Older

templates/repo/commits_list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
{{else}}
5757
</span>
5858
{{end}}
59+
<span style="cursor: pointer;vertical-align: middle;" class="clipboard" data-original="{{$.i18n.Tr "repo.commits.copy_sha"}}" data-success="{{$.i18n.Tr "repo.commits.copy_sha_success"}}" data-error="{{$.i18n.Tr "repo.commits.copy_sha_error"}}" data-content="{{$.i18n.Tr "repo.commits.copy_sha"}}" data-variation="inverted tiny" data-clipboard-text="{{.ID}}">{{svg "octicon-clippy"}}</span>
5960
</td>
6061
<td class="message">
6162
<span class="message-wrapper">

0 commit comments

Comments
 (0)