aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/clone_buttons.tmpl
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-05-30 21:15:57 +0200
committerGitHub <noreply@github.com>2021-05-30 20:15:57 +0100
commit37205039fc83707edc8079d0884d4c12953e80b1 (patch)
treeff4adbd4ce4f6f56c5166758e2e21144d91faa1f /templates/repo/clone_buttons.tmpl
parent36dce0e457d99ae22530f606ce296ef4946b257b (diff)
downloadgitea-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/clone_buttons.tmpl')
-rw-r--r--templates/repo/clone_buttons.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl
index b0377b5bc3..8fc1ba12c1 100644
--- a/templates/repo/clone_buttons.tmpl
+++ b/templates/repo/clone_buttons.tmpl
@@ -14,7 +14,7 @@
<input id="repo-clone-url" value="{{if $.PageIsWiki}}{{$.WikiCloneLink.SSH}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
{{end}}
{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
- <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
+ <button class="ui basic icon button poping up" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
{{svg "octicon-clippy"}}
</button>
{{end}}