mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-04 23:40:18 +00:00
8a3daef525
Fixes #38339 --------- Signed-off-by: TowyTowy <towy@airreps.link> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 lines
902 B
Handlebars
17 lines
902 B
Handlebars
<!-- render the clone combo only when a git protocol is available; the URL input would otherwise be empty -->
|
|
{{$cloneLink := $.CloneButtonOriginLink}}
|
|
{{if or $cloneLink.SupportHTTPS $cloneLink.SupportSSH}}
|
|
<div class="ui action small input clone-buttons-combo" data-global-init="initRepoCloneButtonsCombo">
|
|
{{if $cloneLink.SupportHTTPS}}
|
|
<button class="ui small button repo-clone-https" data-link="{{$cloneLink.HTTPS}}">HTTPS</button>
|
|
{{end}}
|
|
{{if $cloneLink.SupportSSH}}
|
|
<button class="ui small button repo-clone-ssh" data-link="{{$cloneLink.SSH}}">SSH</button>
|
|
{{end}}
|
|
<input size="10" class="repo-clone-url js-clone-url" value="{{Iif $cloneLink.SupportHTTPS $cloneLink.HTTPS $cloneLink.SSH}}" readonly>
|
|
<button class="ui small icon button" data-clipboard-target=".repo-clone-url" data-tooltip-content="{{ctx.Locale.Tr "copy_url"}}">
|
|
{{svg "octicon-copy" 14}}
|
|
</button>
|
|
</div>
|
|
{{end}}
|