diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a85b107eeed62..2d59f817e3521 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1017,6 +1017,8 @@ all_branches = All branches fork_no_valid_owners = This repository can not be forked because there are no valid owners. fork.blocked_user = Cannot fork the repository because you are blocked by the repository owner. use_template = Use this template +clone_https_description = Use Git via the web URL. +clone_ssh_description = Use a password protected SSH key. open_with_editor = Open with %s download_zip = Download ZIP download_tar = Download TAR.GZ diff --git a/templates/repo/clone_script.tmpl b/templates/repo/clone_script.tmpl index 40dae76dc7164..ab0c744952eaa 100644 --- a/templates/repo/clone_script.tmpl +++ b/templates/repo/clone_script.tmpl @@ -10,6 +10,7 @@ const sshBtn = document.getElementById('repo-clone-ssh'); const value = localStorage.getItem('repo-clone-protocol') || 'https'; const isSSH = value === 'ssh' && sshBtn || value !== 'ssh' && !httpsBtn; + const methodDesc = document.getElementById("repo-clone-method-description"); if (httpsBtn) { httpsBtn.textContent = window.origin.split(':')[0].toUpperCase(); @@ -24,6 +25,10 @@ const btn = isSSH ? sshBtn : httpsBtn; if (!btn) return; + if (methodDesc) { + methodDesc.innerText = btn.dataset.description; + } + // NOTE: Keep this function in sync with the one in the js folder function toOriginUrl(urlStr) { try { diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index ef76f3ed5d46b..b04e8a5028322 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -116,26 +116,56 @@