From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/user/settings/keys_ssh.tmpl | 111 ++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 templates/user/settings/keys_ssh.tmpl (limited to 'templates/user/settings/keys_ssh.tmpl') diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl new file mode 100644 index 0000000..058dc9c --- /dev/null +++ b/templates/user/settings/keys_ssh.tmpl @@ -0,0 +1,111 @@ +

+ {{ctx.Locale.Tr "settings.manage_ssh_keys"}} +
+ +
+

+
+
+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ + +
+ + + +
+
+
+
+

+ {{ctx.Locale.Tr "settings.ssh_desc"}}
+ {{ctx.Locale.Tr "settings.ssh_helper" "https://docs.codeberg.org/security/ssh-key/" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh"}} +

+
+ {{if .DisableSSH}} +
+ {{ctx.Locale.Tr "settings.ssh_signonly"}} +
+ {{end}} + {{range $index, $key := .Keys}} +
+
+ {{svg "octicon-key" 32}} +
+
+ {{if .Verified}} +
{{svg "octicon-verified"}}{{ctx.Locale.Tr "settings.ssh_key_verified"}}
+ {{end}} +
{{.Name}}
+
+ {{.Fingerprint}} +
+
+

{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

+
+
+
+ + {{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}} + {{ctx.Locale.Tr "settings.ssh_key_verify"}} + {{end}} +
+
+ {{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}} +
+

{{ctx.Locale.Tr "settings.ssh_token_required"}}

+
+ {{$.CsrfTokenHtml}} + + + +
+ + +
+

{{ctx.Locale.Tr "settings.ssh_token_help"}}

+

{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}

+
+
+
+
+ + +
+ + + + {{ctx.Locale.Tr "settings.cancel"}} + +
+
+ {{end}} + {{end}} +
+ +
-- cgit v1.2.3