Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/profiles/keys/index.html.haml')
-rw-r--r--app/views/profiles/keys/index.html.haml35
1 files changed, 22 insertions, 13 deletions
diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml
index c2e65dcc8ef..0cd41788a53 100644
--- a/app/views/profiles/keys/index.html.haml
+++ b/app/views/profiles/keys/index.html.haml
@@ -1,6 +1,8 @@
- page_title _('SSH Keys')
- add_page_specific_style 'page_bundles/profile'
- @force_desktop_expanded_sidebar = true
+- add_form_class = 'gl-display-none' if !form_errors(@key)
+- hide_class = 'gl-display-none' if form_errors(@key)
.settings-section.js-search-settings-section
.settings-sticky-header
@@ -12,17 +14,24 @@
- config_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_instance_configuration_url }
= html_escape(s_('SSH fingerprints verify that the client is connecting to the correct host. Check the %{config_link_start}current instance configuration%{config_link_end}.')) % { config_link_start: config_link_start, config_link_end: '</a>'.html_safe }
- %h5.gl-font-lg.gl-mt-0
- = _('Add an SSH key')
- %p
- - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/ssh.md') }
- = _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
- = render 'form'
+ = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c|
+ - c.with_header do
+ .gl-new-card-title-wrapper
+ %h3.gl-new-card-title
+ = _('Your SSH keys')
+ .gl-new-card-count
+ = sprite_icon('key', css_class: 'gl-mr-2')
+ = @keys.count
+ .gl-new-card-actions
+ = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: "js-toggle-button js-toggle-content #{hide_class}" }) do
+ = _('Add new key')
+ - c.with_body do
+ .gl-new-card-add-form.gl-m-3.js-toggle-content{ class: add_form_class }
+ %h4.gl-mt-0
+ = _('Add an SSH key')
+ %p
+ - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/ssh.md') }
+ = _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
+ = render 'form'
-.settings-section.js-search-settings-section
- .settings-sticky-header
- .settings-sticky-header-inner
- %h4.gl-my-0
- = _('Your SSH keys (%{count})') % { count: @keys.count }
- .gl-mb-3
- = render 'key_table'
+ = render 'key_table', hide_class: hide_class