Skip to content

Commit

Permalink
change vscode clone link to ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
noerw committed Jul 30, 2022
1 parent 692707f commit 913b67f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_zip"}}</a>
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_tar"}}</a>
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "mr-3"}}{{.locale.Tr "repo.download_bundle"}}</a>
<a class="item" href="vscode://vscode.git/clone?url={{$.RepoCloneLink.HTTPS}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}}</a>
<a class="item" id="repo-clone-vscode" href="vscode://vscode.git/clone?url={{$.RepoCloneLink.HTTPS}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}}</a>
</div>
</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/repo-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export function initRepoCloneLink() {
}
// the empty repo guide
$('.quickstart .empty-repo-guide .clone-url').text(cloneLink);
$('#repo-clone-vscode').attr('href', `vscode://vscode.git/clone?url=${encodeURIComponent(cloneLink)}`);
};
updateUi();

Expand Down

0 comments on commit 913b67f

Please sign in to comment.