Commit 1915ecef authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch 'btn-icon-gpg' into 'master'

Redesign SSH keys list

See merge request gitlab-org/gitlab!53351
parents 04013f09 7720a73a
%li.d-flex.align-items-center.key-list-item %li.key-list-item
.gl-mr-3 .gl-display-flex.gl-align-items-flex-start
- if key.valid? .key-list-item-info.gl-w-full.float-none
- if key.expired? = link_to path_to_key(key, is_admin), class: "title text-3" do
%span.d-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') } = key.title
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
- else
= sprite_icon('key', css_class: 'settings-list-icon d-none d-sm-block ')
- else
%span.d-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') }
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
.key-list-item-info.w-100.float-none .gl-display-flex.gl-align-items-center.gl-mt-2
= link_to path_to_key(key, is_admin), class: "title" do - if key.valid?
= key.title - if key.expired?
%span.text-truncate %span.gl-display-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') }
= key.fingerprint = sprite_icon('warning-solid', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
- else
= sprite_icon('key', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
- else
%span.gl-display-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') }
= sprite_icon('warning-solid', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
.key-list-item-dates.d-flex.align-items-start.justify-content-between %span.gl-text-truncate.gl-sm-ml-3
%span.last-used-at.gl-mr-3 = key.fingerprint
= s_('Profiles|Last used:')
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never') .gl-mt-3= s_('Profiles|Created%{time_ago}'.html_safe) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2')}
%span.expires.gl-mr-3
= s_('Profiles|Expires:') .key-list-item-dates
= key.expires_at ? key.expires_at.to_date : _('Never') %span.last-used-at.gl-mr-3
%span.key-created-at.gl-display-flex.gl-align-items-center = s_('Profiles|Last used:')
= s_('Profiles|Created%{time_ago}'.html_safe) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2')} = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
- if key.can_delete? %span.expires.gl-mr-3
.gl-ml-3 = s_('Profiles|Expires:')
= render 'shared/ssh_keys/key_delete', html_class: "btn btn-default gl-button btn-default-tertiary js-confirm-modal-button", button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) = key.expires_at ? key.expires_at.to_date : _('Never')
%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-danger js-confirm-modal-button", button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin))
---
title: Redesign SSH keys list
merge_request: 53351
author: Yogi (@yo)
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment