From 419003adb24495d804b276d2c7d59b170d0a56b7 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 7 Sep 2023 09:13:11 +0800 Subject: [PATCH] Improve SSH Key / GPG Key / Deploy Key UI (#26949) 1. In many cases, the `flex-list` has previous and next `gt-hidden` siblings, so relax the CSS selector to remove all ".segument .flex-list" paddings. 2. Make the "Add key" button can toggle 3. Move help message into the related segment(panel). Otherwise users would misread the message, eg: the SSH help seemed for GPG because they are so near 4. Move modal element into the segment element, otherwise it affects the layout --- templates/repo/settings/deploy_keys.tmpl | 4 ++-- templates/user/settings/keys_gpg.tmpl | 30 ++++++++++++------------ templates/user/settings/keys_ssh.tmpl | 30 ++++++++++++------------ web_src/css/shared/flex-list.css | 6 ++--- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index a9e540bc6..b776848a5 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -4,14 +4,14 @@ {{.locale.Tr "repo.settings.deploy_keys"}}
{{if not .DisableSSH}} - + {{else}} {{end}}
-
+
{{.CsrfTokenHtml}}
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index e7a66de23..2ecebcd7c 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -1,11 +1,11 @@

{{.locale.Tr "settings.manage_gpg_keys"}}
- +

-
+
{{.CsrfTokenHtml}} @@ -41,7 +41,10 @@
- {{.locale.Tr "settings.gpg_desc"}} +

+ {{.locale.Tr "settings.gpg_desc"}}
+ {{.locale.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}} +

{{range .GPGKeys}}
@@ -107,17 +110,14 @@ {{end}} {{end}}
-
-
-

{{.locale.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}}

- -