Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add link to vscode to repo header #16664

Merged
merged 4 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ 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_ide = Clone in IDE
generate_repo = Generate Repository
generate_from = Generate From
repo_desc = Description
Expand Down
16 changes: 16 additions & 0 deletions templates/repo/clone_buttons.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{{if not $.DisableHTTP}}
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "repo.clone_in_ide"}}" data-variation="tiny inverted">
<span class="text">
IDE
</span>
<div class="menu" tabindex="-1">
<div class="ui header">
<strong>{{.i18n.Tr "repo.clone_in_ide"}}</strong>
</div>
<a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
VS Code
</a>
</div>
</div>
{{end}}

{{if not $.DisableHTTP}}
a1012112796 marked this conversation as resolved.
Show resolved Hide resolved
<button class="ui basic clone button no-transition" id="repo-clone-https" data-link="{{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
Expand Down