summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-09-21 19:51:10 +0800
committerGitHub <noreply@github.com>2022-09-21 19:51:10 +0800
commitd9bc6881ef695b20857c8c1f03c69a64f3521d5e (patch)
tree8125dcf43bc9c20f45076c3aced824d12ba3e548 /templates
parent399514453ed13ca457b12b2413c1e68f0f13acc0 (diff)
downloadgitea-d9bc6881ef695b20857c8c1f03c69a64f3521d5e.tar.gz
gitea-d9bc6881ef695b20857c8c1f03c69a64f3521d5e.zip
Make Clone in VSCode link get updated correctly (#21225)
Follow #20557, fix #21224 The `clone_script` will update `.js-clone-url` and related elements, so it should be put after these elements.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/home.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index fe5af82d1a..e1aa1c4f3b 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -117,7 +117,6 @@
{{if eq $n 0}}
<div class="ui action tiny input" id="clone-panel">
{{template "repo/clone_buttons" .}}
- {{template "repo/clone_script" .}}
<button id="download-btn" class="ui basic small compact jump dropdown icon button tooltip" data-content="{{.locale.Tr "repo.download_archive"}}" data-position="top right">
{{svg "octicon-download"}}
<div class="menu">
@@ -129,6 +128,7 @@
<a class="item js-clone-url-vsc" href="vscode://vscode.git/clone?url={{.CloneButtonOriginLink.HTTPS}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}}</a>
</div>
</button>
+ {{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}}
</div>
{{end}}
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}