<h4 class="ui top attached header">
	{{ctx.Locale.Tr "settings.mirror_ssh_title"}}
</h4>
<div class="ui attached segment">
	<div class="ui form">
		<div class="field">
			<label>{{ctx.Locale.Tr "settings.mirror_ssh_description"}}</label>
		</div>
		{{if .HasMirrorSSHKey}}
		<div class="field">
			<label>{{ctx.Locale.Tr "settings.mirror_ssh_current_key"}}</label>
			<div class="ui action input">
				<input id="ssh-public-key-content" class="js-ssh-key-content" value="{{.MirrorSSHKey.PublicKeyWithComment}}" readonly>
				<button class="ui compact button" data-clipboard-target="#ssh-public-key-content" data-tooltip-content="{{ctx.Locale.Tr "copy"}}">
					{{svg "octicon-copy" 14}}
				</button>
			</div>
			<small class="text grey">{{ctx.Locale.Tr "settings.mirror_ssh_fingerprint"}}: {{.MirrorSSHKey.Fingerprint}}</small>
		</div>
		{{end}}
		<div class="field">
			<form action="{{.Link}}/mirror-ssh/regenerate" method="post">
				{{.CsrfTokenHtml}}
				<button class="ui primary button" type="submit">
					{{if .HasMirrorSSHKey}}
						{{ctx.Locale.Tr "settings.mirror_ssh_regenerate"}}
					{{else}}
						{{ctx.Locale.Tr "settings.mirror_ssh_generate"}}
					{{end}}
				</button>
			</form>
		</div>
		<div class="field">
			<div class="ui info message">
				<i class="info icon"></i>
				{{ctx.Locale.Tr "settings.mirror_ssh_documentation"}}
			</div>
		</div>
		<div class="field">
			<div class="ui warning message">
				<i class="warning icon"></i>
				{{ctx.Locale.Tr "settings.mirror_ssh_org_notice"}}
			</div>
		</div>
	</div>
</div>

