Skip to content

Commit ca13e1d

Browse files
authored
Add link to vscode to repo header (#16664)
add link to vscode to repo header Signed-off-by: a1012112796 <1012112796@qq.com>
1 parent 162c32a commit ca13e1d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

options/locale/locale_en-US.ini

+3
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,9 @@ fork_repo = Fork Repository
768768
fork_from = Fork From
769769
fork_visibility_helper = The visibility of a forked repository cannot be changed.
770770
use_template = Use this template
771+
clone_in_vsc = Clone in VS Code
772+
download_zip = Download ZIP
773+
download_tar = Download TAR.GZ
771774
generate_repo = Generate Repository
772775
generate_from = Generate From
773776
repo_desc = Description

templates/repo/home.tmpl

+5-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@
113113
<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">
114114
{{svg "octicon-download"}}
115115
<div class="menu">
116-
<a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
117-
<a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
116+
<a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
117+
{{.i18n.Tr "repo.clone_in_vsc"}}
118+
</a>
119+
<a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_zip"}}</a>
120+
<a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;{{.i18n.Tr "repo.download_tar"}}</a>
118121
</div>
119122
</button>
120123
</div>

0 commit comments

Comments
 (0)