Skip to content

Commit

Permalink
Add link to vscode to repo header (go-gitea#16664)
Browse files Browse the repository at this point in the history
add link to vscode to repo header

Signed-off-by: a1012112796 <1012112796@qq.com>
  • Loading branch information
a1012112796 committed Aug 12, 2021
1 parent 162c32a commit ca13e1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,9 @@ fork_repo = Fork Repository
fork_from = Fork From
fork_visibility_helper = The visibility of a forked repository cannot be changed.
use_template = Use this template
clone_in_vsc = Clone in VS Code
download_zip = Download ZIP
download_tar = Download TAR.GZ
generate_repo = Generate Repository
generate_from = Generate From
repo_desc = Description
Expand Down
7 changes: 5 additions & 2 deletions templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit ca13e1d

Please sign in to comment.