From f46e67b519eb65f6feb8abd04c5c896bfd2001ea Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 28 Oct 2021 12:55:48 +0200 Subject: [PATCH] Move key forms before list and add cancel button (#17432) * Move GPG form before list and add cancel button * Move SSH form before list and add cancel button Co-authored-by: Lunny Xiao Co-authored-by: wxiaoguang --- templates/repo/settings/deploy_keys.tmpl | 38 +++++-------- templates/user/settings/keys_gpg.tmpl | 72 ++++++++++++------------ templates/user/settings/keys_ssh.tmpl | 56 +++++++++--------- web_src/js/features/common-global.js | 3 +- 4 files changed, 80 insertions(+), 89 deletions(-) diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 68ab36b593..019a62b5f1 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -4,16 +4,18 @@ {{template "repo/settings/navbar" .}}
{{template "base/alert" .}} -
-

- {{.i18n.Tr "repo.settings.add_deploy_key"}} -
- -
-

-
+

+ {{.i18n.Tr "repo.settings.deploy_keys"}} +
+ {{if not .DisableSSH}} +
{{.i18n.Tr "repo.settings.add_deploy_key"}}
+ {{else}} +
{{.i18n.Tr "settings.ssh_disabled"}}
+ {{end}} +
+

+
+
{{.CsrfTokenHtml}}
@@ -39,21 +41,11 @@ +
-
-
-

- {{.i18n.Tr "repo.settings.deploy_keys"}} -
- {{if not .DisableSSH}} -
{{.i18n.Tr "repo.settings.add_deploy_key"}}
- {{else}} -
{{.i18n.Tr "settings.ssh_disabled"}}
- {{end}} -
-

-
{{if .Deploykeys}}
{{range .Deploykeys}} diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index c840801e5a..20ccea9f00 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -5,7 +5,41 @@
-
+
+
+ {{.CsrfTokenHtml}} + +
+ + +
+ {{if .Err_Signature}} +
+

{{.i18n.Tr "settings.gpg_token_required"}}

+
+
+
+
+ + +
+ {{end}} + + + +
+
+
{{.i18n.Tr "settings.gpg_desc"}}
@@ -76,42 +110,6 @@

{{.i18n.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}

-
-

- {{.i18n.Tr "settings.add_new_gpg_key"}} -

-
-
- {{.CsrfTokenHtml}} - -
- - -
- {{if .Err_Signature}} -
-

{{.i18n.Tr "settings.gpg_token_required"}}

-
-
-
-
- - -
- {{end}} - - -
-
-