aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2021-08-12 20:21:34 +0800
committerGitHub <noreply@github.com>2021-08-12 14:21:34 +0200
commitca13e1d56c561f72cf8ad251fe61b1898abfec51 (patch)
treebfc6a8adfb60492a5b6e4feb74d252302e729751 /templates
parent162c32af7ec9cc434895079cfc7bfc683feb4d4c (diff)
downloadgitea-ca13e1d56c561f72cf8ad251fe61b1898abfec51.tar.gz
gitea-ca13e1d56c561f72cf8ad251fe61b1898abfec51.zip
Add link to vscode to repo header (#16664)
add link to vscode to repo header Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/home.tmpl7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 254bbb7380..5629c7ee12 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -113,8 +113,11 @@
<button id="download-btn" class="ui basic jump dropdown icon button poping up" data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted" data-position="top right">
{{svg "octicon-download"}}
<div class="menu">
- <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
- <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
+ <a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
+ {{.i18n.Tr "repo.clone_in_vsc"}}
+ </a>
+ <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_zip"}}</a>
+ <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_tar"}}</a>
</div>
</button>
</div>