diff options
Diffstat (limited to 'app/views/shared/access_tokens')
-rw-r--r-- | app/views/shared/access_tokens/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/access_tokens/_table.html.haml | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml index 680626f7880..820a6cbd15d 100644 --- a/app/views/shared/access_tokens/_form.html.haml +++ b/app/views/shared/access_tokens/_form.html.haml @@ -30,5 +30,5 @@ = f.label :scopes, _('Scopes'), class: 'label-bold' = render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes - .prepend-top-default + .gl-mt-3 = f.submit _('Create %{type}') % { type: type }, class: 'btn btn-success', data: { qa_selector: 'create_token_button' } diff --git a/app/views/shared/access_tokens/_table.html.haml b/app/views/shared/access_tokens/_table.html.haml index 5518c31cb06..55231cb9429 100644 --- a/app/views/shared/access_tokens/_table.html.haml +++ b/app/views/shared/access_tokens/_table.html.haml @@ -16,6 +16,9 @@ %tr %th= _('Name') %th= s_('AccessTokens|Created') + %th + = _('Last Used') + = link_to icon('question-circle'), help_page_path('user/profile/personal_access_tokens.md', anchor: 'token-activity'), target: '_blank' %th= _('Expires') %th= _('Scopes') %th @@ -25,9 +28,18 @@ %td= token.name %td= token.created_at.to_date.to_s(:medium) %td + - if token.last_used_at? + %span.token-last-used-label= _(time_ago_with_tooltip(token.last_used_at)) + - else + %span.token-never-used-label= _('Never') + %td - if token.expires? - %span{ class: ('text-warning' if token.expires_soon?) } - = _('In %{time_to_now}') % { time_to_now: distance_of_time_in_words_to_now(token.expires_at) } + - if token.expires_at.past? || token.expires_at.today? + %span{ class: 'text-danger has-tooltip', title: _('Expiration not enforced') } + = _('Expired') + - else + %span{ class: ('text-warning' if token.expires_soon?) } + = _('In %{time_to_now}') % { time_to_now: distance_of_time_in_words_to_now(token.expires_at) } - else %span.token-never-expires-label= _('Never') %td= token.scopes.present? ? token.scopes.join(', ') : _('<no scopes selected>') |