Skip to content

Commit d9bc688

Browse files
authored
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.
1 parent 3995144 commit d9bc688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/home.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
{{if eq $n 0}}
118118
<div class="ui action tiny input" id="clone-panel">
119119
{{template "repo/clone_buttons" .}}
120-
{{template "repo/clone_script" .}}
121120
<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">
122121
{{svg "octicon-download"}}
123122
<div class="menu">
@@ -129,6 +128,7 @@
129128
<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>
130129
</div>
131130
</button>
131+
{{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}}
132132
</div>
133133
{{end}}
134134
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}

0 commit comments

Comments
 (0)