summaryrefslogtreecommitdiff
path: root/app/views/profiles/active_sessions/_active_session.html.haml
blob: d40b771f48bd9025ec24f90204f6eb6a568224d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- is_current_session = active_session.current?(session)

%li
  .pull-left.append-right-10{ data: { toggle: 'tooltip' }, title: active_session.human_device_type }
    = active_session_device_type_icon(active_session)

  .description.pull-left
    %div
      %strong= active_session.ip_address
    - if is_current_session
      %div This is your current session
    - else
      %div
        Last accessed on
        = l(active_session.updated_at, format: :short)

    %div
      %strong= active_session.browser
      on
      %strong= active_session.os

    %div
      %strong Signed in
      on
      = l(active_session.created_at, format: :short)

  - unless is_current_session
    .pull-right
      = link_to profile_active_session_path(active_session.session_id), data: { confirm: 'Are you sure? The device will be signed out of GitLab.' }, method: :delete, class: "btn btn-danger prepend-left-10" do
        %span.sr-only Revoke
        Revoke