diff options
author | silverwind <me@silverwind.io> | 2021-05-30 21:15:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-30 20:15:57 +0100 |
commit | 37205039fc83707edc8079d0884d4c12953e80b1 (patch) | |
tree | ff4adbd4ce4f6f56c5166758e2e21144d91faa1f /templates/repo/issue | |
parent | 36dce0e457d99ae22530f606ce296ef4946b257b (diff) | |
download | gitea-37205039fc83707edc8079d0884d4c12953e80b1.tar.gz gitea-37205039fc83707edc8079d0884d4c12953e80b1.zip |
Replace clipboard.js with async clipboard api (#15899)
Use async clipboard api [1] over this dependency, saving around 10kB
bundle size before minify while delivering the same functionality.
The issue comment button works but does not have a popup indication. We
could add some toast-style notifications in the future to fix that but I
think it's out of scope of this PR.
[1] https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/context_menu.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/context_menu.tmpl b/templates/repo/issue/view_content/context_menu.tmpl index bbffd53460..e3001cddce 100644 --- a/templates/repo/issue/view_content/context_menu.tmpl +++ b/templates/repo/issue/view_content/context_menu.tmpl @@ -10,7 +10,7 @@ {{ else }} {{ $referenceUrl = Printf "%s%s/pulls/%d/files#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag }} {{ end }} - <div class="item context clipboard" data-clipboard-text="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div> + <div class="item context" data-clipboard-text="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div> <div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}</div> {{if not .ctx.UnitIssuesGlobalDisabled}} <div class="item context reference-issue" data-target="{{.item.ID}}" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-reference="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}</div> |