_sessions.html.haml 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. %h3= t 'sessions.title'
  2. %p.muted-hint
  3. = t 'sessions.explanation'
  4. = link_to t('sessions.view_authentication_history'), settings_login_activities_path
  5. %hr.spacer/
  6. .table-wrapper
  7. %table.table.inline-table
  8. %thead
  9. %tr
  10. %th= t 'sessions.browser'
  11. %th= t 'sessions.ip'
  12. %th= t 'sessions.activity'
  13. %th
  14. %tbody
  15. - @sessions.each do |session|
  16. %tr
  17. %td
  18. %span{ title: session.user_agent }<
  19. = fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session)
  20. = ' '
  21. = t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: "#{session.browser}"), platform: t("sessions.platforms.#{session.platform}", default: "#{session.platform}")
  22. %td
  23. %samp= session.ip
  24. %td
  25. - if current_session.session_id == session.session_id
  26. = t 'sessions.current_session'
  27. - else
  28. %time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at)
  29. %td
  30. - if current_session.session_id != session.session_id && !current_account.suspended?
  31. = table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete