diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/views/profiles/keys | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/views/profiles/keys')
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/profiles/keys/_key.html.haml | 5 | ||||
-rw-r--r-- | app/views/profiles/keys/_key_details.html.haml | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index e6d91543585..5c4ea7b2ecb 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -12,7 +12,11 @@ = f.label :title, s_('Profiles|Title'), class: 'label-bold' = f.text_field :title, class: "form-control gl-form-input input-lg", required: true, placeholder: s_('Profiles|Example: MacBook key'), data: { qa_selector: 'key_title_field' } %p.form-text.text-muted= s_('Profiles|Key titles are publicly visible.') - + .form-row + .col.form-group + = f.label :usage_type, s_('Profiles|Usage type') + .gl-md-form-input-lg + = f.select :usage_type, options_for_select(ssh_key_usage_types, :auth_and_signing), {}, { class: 'gl-form-select custom-select' } .form-row .col.form-group .js-access-tokens-expires-at{ data: {min_date: Date.tomorrow, max_date: max_date, default_date_offset: 365, description: ssh_key_expires_field_description } } diff --git a/app/views/profiles/keys/_key.html.haml b/app/views/profiles/keys/_key.html.haml index de4a19bdad7..219e7c4d2fe 100644 --- a/app/views/profiles/keys/_key.html.haml +++ b/app/views/profiles/keys/_key.html.haml @@ -25,7 +25,10 @@ %span.expires.gl-mr-3 = key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:') = key.expires_at ? key.expires_at.to_date : _('Never') + %span.last-used-at.gl-mr-3 + = s_('Profiles|Usage type:') + = ssh_key_usage_types.invert[key.usage_type] %span.key-created-at.gl-display-flex.gl-align-items-center - if key.can_delete? .gl-ml-3 - = render 'shared/ssh_keys/key_delete', html_class: "btn gl-button btn-icon btn-default js-confirm-modal-button", button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) + = render 'shared/ssh_keys/key_delete', icon: true, button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index 04fa1d96204..3c05502be57 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -10,6 +10,9 @@ %span.light= _('Title:') %strong= @key.title %li + %span.light= s_('Profiles|Usage type:') + %strong= ssh_key_usage_types.invert[@key.usage_type] + %li %span.light= _('Created on:') %strong= @key.created_at.to_s(:medium) %li @@ -39,4 +42,4 @@ .col-md-12 .float-right - if @key.can_delete? - = render 'shared/ssh_keys/key_delete', text: _('Delete'), html_class: "btn btn-danger gl-button delete-key js-confirm-modal-button", button_data: ssh_key_delete_modal_data(@key, path_to_key(@key, is_admin)) + = render 'shared/ssh_keys/key_delete', button_data: ssh_key_delete_modal_data(@key, path_to_key(@key, is_admin)) |